mirror of
https://github.com/minio/minio.git
synced 2025-04-21 11:04:20 -04:00
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)
|
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")
|
logger.Fatal(err, "Invalid MINIO_BROWSER_REDIRECT value is environment variable")
|
||||||
}
|
}
|
||||||
|
u.Path = "" // remove any path component such as `/`
|
||||||
globalBrowserRedirectURL = u
|
globalBrowserRedirectURL = u
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -157,6 +157,9 @@ func sortIPs(ipList []string) []string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getConsoleEndpoints() (consoleEndpoints []string) {
|
func getConsoleEndpoints() (consoleEndpoints []string) {
|
||||||
|
if globalBrowserRedirectURL != nil {
|
||||||
|
return []string{globalBrowserRedirectURL.String()}
|
||||||
|
}
|
||||||
var ipList []string
|
var ipList []string
|
||||||
if globalMinioConsoleHost == "" {
|
if globalMinioConsoleHost == "" {
|
||||||
ipList = sortIPs(mustGetLocalIP4().ToSlice())
|
ipList = sortIPs(mustGetLocalIP4().ToSlice())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user