Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

fix(setup): use runtime AUTH_TOKEN variable for Authorization headers

rcourtman452a19eafa87
diff --git a/internal/api/config_handlers.go b/internal/api/config_handlers.go
index 4716bf461d..9faa80b48d 100644
--- a/internal/api/config_handlers.go
+++ b/internal/api/config_handlers.go
@@ -4745,7 +4745,7 @@ Host ${NODE}
# This will be written to /home/pulse/.ssh/config inside the container
echo "$SSH_CONFIG" | curl -s -X POST "%s/api/system/ssh-config" \
-H "Content-Type: text/plain" \
- -H "Authorization: Bearer %s" \
+ -H "Authorization: Bearer $AUTH_TOKEN" \
--data-binary @- > /dev/null 2>&1
if [ $? -eq 0 ]; then
@@ -4934,7 +4934,7 @@ EOF
VERIFY_RESPONSE=$(curl -s -X POST "%s/api/system/verify-temperature-ssh" \
-H "Content-Type: application/json" \
- -H "Authorization: Bearer %s" \
+ -H "Authorization: Bearer $AUTH_TOKEN" \
-d "{\"nodes\": \"$CONFIGURED_NODES\"}" 2>/dev/null || echo "")
if [ -n "$VERIFY_RESPONSE" ]; then
@@ -5056,7 +5056,7 @@ fi
tokenName, tokenName, tokenName, tokenName, tokenName, tokenName,
authToken, pulseURL, serverHost, tokenName, tokenName, storagePerms,
sshKeys.ProxyPublicKey, sshKeys.SensorsPublicKey, minProxyReadyVersion,
- pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, authToken, pulseURL, authToken, pulseURL, tokenName)
+ pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, tokenName)
} else { // PBS
script = fmt.Sprintf(`#!/bin/bash