File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
internals/proxy/middlewares Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ func authHandler(next http.Handler) http.Handler {
4646 if isValidToken (tokens , authToken ) {
4747 success = true
4848 }
49-
5049 case Basic :
5150 basicAuthBody , err := base64 .StdEncoding .DecodeString (authToken )
5251
@@ -55,11 +54,12 @@ func authHandler(next http.Handler) http.Handler {
5554 }
5655
5756 basicAuth := string (basicAuthBody )
58- basicAuthParams := strings .Split (basicAuth , ":" )
57+ basicAuthParts := strings .Split (basicAuth , ":" )
5958
6059 user := "api"
60+ authToken = basicAuthParts [1 ]
6161
62- if basicAuthParams [0 ] == user && isValidToken (tokens , basicAuthParams [ 1 ] ) {
62+ if basicAuthParts [0 ] == user && isValidToken (tokens , authToken ) {
6363 success = true
6464 }
6565 }
@@ -108,4 +108,4 @@ func getAuthType(str string) authType {
108108
109109func isValidToken (tokens []string , match string ) bool {
110110 return slices .Contains (tokens , match )
111- }
111+ }
You can’t perform that action at this time.
0 commit comments