Skip to content

Commit fac1253

Browse files
committed
fix(server): add proceed-db-migration to publicPaths
Signed-off-by: Joshua Smith <jbsmith7741@gmail.com>
1 parent af2fc47 commit fac1253

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

backend/server/api/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func SetupApiServer(router *gin.Engine) {
127127
router.UseRawPath = true
128128
// router.UnescapePathValues = false
129129

130-
// Endpoint to proceed database migration — must be unauthenticated because
130+
// Endpoint to proceed database migration — listed in auth.publicPaths because
131131
// auth tables may not exist yet when migration is pending.
132132
router.GET("/proceed-db-migration", func(ctx *gin.Context) {
133133
// Execute database migration

backend/server/api/auth/middleware.go

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,16 @@ import (
3434
// and clear its session even when the cookie has lapsed; both handlers
3535
// short-circuit gracefully when no user is set.
3636
var publicPaths = map[string]struct{}{
37-
"/ping": {},
38-
"/ready": {},
39-
"/health": {},
40-
"/version": {},
41-
PathMethods: {},
42-
PathLogin: {},
43-
PathCallback: {},
44-
PathLogout: {},
45-
PathUserInfo: {},
37+
"/ping": {},
38+
"/ready": {},
39+
"/health": {},
40+
"/version": {},
41+
"/proceed-db-migration": {},
42+
PathMethods: {},
43+
PathLogin: {},
44+
PathCallback: {},
45+
PathLogout: {},
46+
PathUserInfo: {},
4647
}
4748

4849
func OIDCAuthentication() gin.HandlerFunc { return defaultService.OIDCAuthentication() }

0 commit comments

Comments
 (0)