mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
use expected MinIO URLs for console (#12770)
when TLS is configured using IPs directly might interfere and not work properly when the server is configured with TLS certs but the certs only have domain certs. Also additionally allow users to specify a public accessible URL for console to talk to MinIO i.e `MINIO_SERVER_URL` this would allow them to use an external ingress domain to talk to MinIO. This internally fixes few problems such as presigned URL generation on the console UI etc. This needs to be done additionally for any MinIO deployments that might have a much more stricter requirement when running in standalone mode such as FS or standalone erasure code.
This commit is contained in:
@@ -245,7 +245,7 @@ func (l *EndpointServerPools) Add(zeps PoolEndpoints) error {
|
||||
func (l EndpointServerPools) Localhost() string {
|
||||
for _, ep := range l {
|
||||
for _, endpoint := range ep.Endpoints {
|
||||
if endpoint.IsLocal {
|
||||
if endpoint.IsLocal && endpoint.Host != "" {
|
||||
u := &url.URL{
|
||||
Scheme: endpoint.Scheme,
|
||||
Host: endpoint.Host,
|
||||
@@ -254,7 +254,11 @@ func (l EndpointServerPools) Localhost() string {
|
||||
}
|
||||
}
|
||||
}
|
||||
return ""
|
||||
host := globalMinioHost
|
||||
if host == "" {
|
||||
host = sortIPs(localIP4.ToSlice())[0]
|
||||
}
|
||||
return fmt.Sprintf("%s://%s", getURLScheme(globalIsTLS), net.JoinHostPort(host, globalMinioPort))
|
||||
}
|
||||
|
||||
// LocalDisksPaths returns the disk paths of the local disks
|
||||
|
||||
Reference in New Issue
Block a user