aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-01-20 05:17:15 -0800
committerFuwn <[email protected]>2026-01-20 05:17:15 -0800
commit1e01310f91b2a9dd0dcf3b91935ce74f893aa65f (patch)
tree6fb5a65b489ca0ed352eaff66a535a55dae8d63e
parentstyle: Remove default link underline styling (diff)
downloadkaze-1e01310f91b2a9dd0dcf3b91935ce74f893aa65f.tar.xz
kaze-1e01310f91b2a9dd0dcf3b91935ce74f893aa65f.zip
fix: Allow non-HTTP URL schemes in monitor links
-rw-r--r--internal/server/server.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/server/server.go b/internal/server/server.go
index af3660e..fe8c01e 100644
--- a/internal/server/server.go
+++ b/internal/server/server.go
@@ -144,7 +144,7 @@ type GroupData struct {
type MonitorData struct {
Name string
Type string
- Link string // Custom URL for clicking the monitor name
+ Link template.URL // Custom URL for clicking the monitor name (trusted)
Status string
StatusClass string
ResponseTime int64
@@ -234,7 +234,7 @@ func (s *Server) handleIndex(w http.ResponseWriter, r *http.Request) {
md := MonitorData{
Name: monCfg.Name,
Type: monCfg.Type,
- Link: monCfg.Link,
+ Link: template.URL(monCfg.Link),
DisablePingTooltips: monCfg.DisablePingTooltips,
}