mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-28 09:14:32 -04:00
Implement HTTP basic auth feature
This commit is contained in:
parent
665c263c03
commit
23736549f9
3 changed files with 34 additions and 0 deletions
|
@ -265,6 +265,15 @@
|
|||
<label for="headers" class="form-label">{{ $t("Headers") }}</label>
|
||||
<textarea id="headers" v-model="monitor.headers" class="form-control" :placeholder="headersPlaceholder"></textarea>
|
||||
</div>
|
||||
|
||||
<!-- HTTP Basic Auth -->
|
||||
<h4 class="mt-5 mb-2">{{ $t("HTTP Basic Auth") }}</h4>
|
||||
<div class="my-3">
|
||||
<label for="basicauth" class="form-label">{{ $t("Username") }}</label>
|
||||
<input id="basicauth-user" v-model="monitor.basicauth_user" type="text" class="form-control" :placeholder="Username">
|
||||
<label for="basicauth" class="form-label">{{ $t("Password") }}</label>
|
||||
<input id="basicauth-pass" v-model="monitor.basicauth_pass" type="password" class="form-control" :placeholder="Password">
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -487,6 +496,7 @@ export default {
|
|||
this.monitor.headers = JSON.stringify(JSON.parse(this.monitor.headers), null, 4);
|
||||
}
|
||||
|
||||
|
||||
if (this.isAdd) {
|
||||
this.$root.add(this.monitor, async (res) => {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue