Follow multiple redirects during the OIDC flow.

This commit is contained in:
2025-02-06 23:31:13 +00:00
parent c09e7a9228
commit 09daa1025c
3 changed files with 129 additions and 1 deletions
+7
View File
@@ -225,6 +225,13 @@ func New(ctx context.Context, next http.Handler, config *Config, name string) (h
httpClient = &http.Client{
Timeout: time.Second * 15, // Reduced timeout
Transport: transport,
CheckRedirect: func(req *http.Request, via []*http.Request) error {
// Always follow redirects for OIDC endpoints
if len(via) >= 50 {
return fmt.Errorf("stopped after 50 redirects")
}
return nil
},
}
}