From 2ac006d3545a920d12644a0e3df23ec0ade06bd0 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Thu, 30 Oct 2025 15:56:01 +0100 Subject: [PATCH] Fixes #1625 --- server/auth.go | 2 +- server/server.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/auth.go b/server/auth.go index 3d7c2513..7f24561d 100644 --- a/server/auth.go +++ b/server/auth.go @@ -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 } diff --git a/server/server.go b/server/server.go index ec690f5e..2356bf1c 100644 --- a/server/server.go +++ b/server/server.go @@ -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")