mirror of https://github.com/minio/minio.git
fix: use browser redirect URL for IDP callback (#12689)
if browser_redirect_url is set use that for IDP callback automatically, if we do not have to set REDIRECT_URI for OpenID callback URL.
This commit is contained in:
parent
c438eda624
commit
a655e7f820
|
@ -428,6 +428,7 @@ func handleCommonEnvVars() {
|
|||
err := fmt.Errorf("URL contains unexpected resources, expected URL to be of http(s)://minio.example.com format: %v", u)
|
||||
logger.Fatal(err, "Invalid MINIO_BROWSER_REDIRECT value is environment variable")
|
||||
}
|
||||
u.Path = "" // remove any path component such as `/`
|
||||
globalBrowserRedirectURL = u
|
||||
}
|
||||
}
|
||||
|
|
|
@ -157,6 +157,9 @@ func sortIPs(ipList []string) []string {
|
|||
}
|
||||
|
||||
func getConsoleEndpoints() (consoleEndpoints []string) {
|
||||
if globalBrowserRedirectURL != nil {
|
||||
return []string{globalBrowserRedirectURL.String()}
|
||||
}
|
||||
var ipList []string
|
||||
if globalMinioConsoleHost == "" {
|
||||
ipList = sortIPs(mustGetLocalIP4().ToSlice())
|
||||
|
|
Loading…
Reference in New Issue