Fixes #1625
This commit is contained in:
+1
-1
@@ -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
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user