Fix compliance page login redirect to custom domains
SafeRedirect previously matched against a single static host string, so OIDC callbacks always fell back to the console instead of redirecting back to compliance pages on custom domains. Refactor AllowedHost into a dynamic AllowedHostFunc and wire a trust-service lookup into the connect handler so custom domain hosts are accepted. Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -45,7 +45,7 @@ func NewSAMLHandler(iam *iam.Service, cookieConfig securecookie.Config, baseURL
|
||||
sessionCookie: authn.NewCookie(&cookieConfig),
|
||||
baseURL: baseURL,
|
||||
logger: logger,
|
||||
safeRedirect: &saferedirect.SafeRedirect{AllowedHost: baseURL.Host()},
|
||||
safeRedirect: saferedirect.New(saferedirect.StaticHosts(baseURL.Host())),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user