Skip to content

Commit a7209bd

Browse files
committed
[#2473] simplify switch case
1 parent ce5d918 commit a7209bd

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

backend/server/oidc/controller.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,7 @@ func (ctl *Controller) wrapOIDCSession(next http.Handler) http.Handler {
165165
sessionHandler := ctl.dbSessionManager.SessionMiddleware(ctl.authSessionManager.LoadAndSave(next))
166166
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
167167
switch {
168-
case strings.HasPrefix(r.URL.Path, loginURLPath):
169-
sessionHandler.ServeHTTP(w, r)
170-
case strings.HasPrefix(r.URL.Path, callbackURLPath):
168+
case strings.HasPrefix(r.URL.Path, loginURLPath), strings.HasPrefix(r.URL.Path, callbackURLPath):
171169
sessionHandler.ServeHTTP(w, r)
172170
default:
173171
next.ServeHTTP(w, r)

0 commit comments

Comments
 (0)