diff --git a/cmd/soundtouch-service/main.go b/cmd/soundtouch-service/main.go
index 79209f1..6892f88 100644
--- a/cmd/soundtouch-service/main.go
+++ b/cmd/soundtouch-service/main.go
@@ -964,10 +964,17 @@ func applyPersistedSettings(ds *datastore.DataStore, config *serviceConfig) data
}
// persisted.HTTPServerURL is the HTTPS override (empty = derive).
- // Existing installs carry their old effective value here, so it is
- // preserved as an override; recompute the effective URL either way,
- // since serverURL may have come from the persisted settings above.
+ // Existing installs carry their old effective value here; if it is
+ // exactly what we would derive anyway, treat it as "derive" so those
+ // installs don't show a spurious override in the UI. A genuinely custom
+ // value is kept as an override. Recompute either way, since serverURL
+ // may have come from the persisted settings above.
config.httpsOverride = persisted.HTTPServerURL
+ if config.httpsOverride != "" &&
+ config.httpsOverride == handlers.DeriveHTTPSURL(config.serverURL, "", config.httpsPort, config.httpsDefaultURL) {
+ config.httpsOverride = ""
+ }
+
config.httpsServerURL = handlers.DeriveHTTPSURL(config.serverURL, config.httpsOverride, config.httpsPort, config.httpsDefaultURL)
config.discoveryEnabled = persisted.DiscoveryEnabled
diff --git a/pkg/service/handlers/web/index.html b/pkg/service/handlers/web/index.html
index 9a5f7c5..8d84e4c 100644
--- a/pkg/service/handlers/web/index.html
+++ b/pkg/service/handlers/web/index.html
@@ -187,21 +187,20 @@
—
-
- AfterTouch also serves an HTTPS endpoint (used for the - DNS-based redirect, music-service login, and certificate - trust). By default it follows the Target Domain above - (same host, on the HTTPS port), so you normally don't - set anything here. Provide an override only when a - reverse proxy serves HTTPS on a different host or port. - Leave it empty to go back to deriving it automatically. - Takes effect after saving. -
- -+ AfterTouch also serves an HTTPS endpoint (used for the + DNS-based redirect, music-service login, and certificate + trust). By default it follows the Target Domain above + (same host, on the HTTPS port), so you normally don't set + anything here. Provide an override only when a reverse + proxy serves HTTPS on a different host or port. Leave it + empty to go back to deriving it automatically. Takes effect + after saving. +
+ +