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 // Helper function to clean empty strings from split results
cleanSplit := func(s string) []string { cleanSplit := func(s string) []string {
parts := strings.Split(s, ",") if s == "" {
if len(parts) == 1 && parts[0] == "" { return nil
return []string{} }
}
return parts return strings.Split(s, ",")
} }
options.ResponseHeaders = cleanSplit(responseHeaders) options.ResponseHeaders = cleanSplit(responseHeaders)