bug fix: uptime-kuma widget should be able to use environment variables for its api key

This commit is contained in:
casmbu 2025-08-02 15:29:04 -04:00
parent 97b884d9c4
commit dcf124e17b

View file

@ -60,10 +60,10 @@ export default {
}, },
/* Create authorisation header for the instance from the apiKey */ /* Create authorisation header for the instance from the apiKey */
authHeaders() { authHeaders() {
if (!this.options.apiKey) { if (!this.apiKey) {
return {}; return {};
} }
const encoded = window.btoa(`:${this.options.apiKey}`); const encoded = window.btoa(`:${this.apiKey}`);
return { Authorization: `Basic ${encoded}` }; return { Authorization: `Basic ${encoded}` };
}, },
}, },