mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-09-29 23:08:53 -04:00
Added dropdown for authentication methods
This commit is contained in:
parent
442f54de84
commit
35a56dd9e0
5 changed files with 2213 additions and 2192 deletions
|
@ -9,11 +9,11 @@ class Ntfy extends NotificationProvider {
|
|||
let okMsg = "Sent Successfully.";
|
||||
try {
|
||||
let headers = {};
|
||||
if (notification.ntfyusername) {
|
||||
if (notification.ntfyAuthenticationMethod === "usernamePassword") {
|
||||
headers = {
|
||||
"Authorization": "Basic " + Buffer.from(notification.ntfyusername + ":" + notification.ntfypassword).toString("base64"),
|
||||
};
|
||||
} else if (notification.ntfyaccesstoken) {
|
||||
} else if (notification.ntfyAuthenticationMethod === "accessToken") {
|
||||
headers = {
|
||||
"Authorization": "Bearer " + notification.ntfyaccesstoken,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue