Update src/mod/auth/sso/forward/forward.go

Co-authored-by: James Elliott <james-d-elliott@users.noreply.github.com>
This commit is contained in:
Toby Chui
2025-07-08 12:38:08 +08:00
committed by GitHub
parent e225407b03
commit ad53b894c0

View File

@@ -60,11 +60,11 @@ func NewAuthRouter(options *AuthRouterOptions) *AuthRouter {
// Helper function to clean empty strings from split results
cleanSplit := func(s string) []string {
parts := strings.Split(s, ",")
if len(parts) == 1 && parts[0] == "" {
return []string{}
}
return parts
if s == "" {
return nil
}
return strings.Split(s, ",")
}
options.ResponseHeaders = cleanSplit(responseHeaders)