allow setting a base-path for the web UI and API (#583)

This commit is contained in:
Christoph Haas
2025-12-11 18:38:26 +01:00
parent 8cc937b031
commit b6a27616c1
18 changed files with 177 additions and 50 deletions

View File

@@ -49,7 +49,11 @@ func NewSessionWrapper(cfg *config.Config) *SessionWrapper {
sessionManager.Cookie.Secure = strings.HasPrefix(cfg.Web.ExternalUrl, "https")
sessionManager.Cookie.HttpOnly = true
sessionManager.Cookie.SameSite = http.SameSiteLaxMode
sessionManager.Cookie.Path = "/"
if cfg.Web.BasePath != "" {
sessionManager.Cookie.Path = cfg.Web.BasePath
} else {
sessionManager.Cookie.Path = "/"
}
sessionManager.Cookie.Persist = false
wrappedSessionManager := &SessionWrapper{sessionManager}