mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-08-05 12:56:48 +02:00
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:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user