This commit is contained in:
Zef Hemel
2025-10-30 15:56:01 +01:00
parent f28815d642
commit 2ac006d354
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -136,7 +136,7 @@ func addAuthEndpoints(r chi.Router, config *ServerConfig) {
setCookie(w, "refreshLogin", "true", cookieOptions)
}
redirectPath := "/"
redirectPath := applyURLPrefix("/", config.HostURLPrefix)
if from != "" {
redirectPath = from
}
+3 -3
View File
@@ -49,11 +49,11 @@ func Router(config *ServerConfig) chi.Router {
// Authentication middleware (applies to all routes after this point)
r.Use(authMiddleware(config))
// Authentication endpoints (must come before auth middleware)
addAuthEndpoints(r, config)
routes := chi.NewRouter()
// Authentication endpoints (must come before auth middleware)
addAuthEndpoints(routes, config)
routes.Get("/.ping", func(w http.ResponseWriter, r *http.Request) {
spaceConfig := spaceConfigFromContext(r.Context())
w.Header().Set("Cache-Control", "no-cache")