mirror of
https://github.com/minio/minio.git
synced 2025-01-13 07:53:21 -05:00
fix: host extraction without port
This commit is contained in:
parent
90cff10e2b
commit
f7f9517b6a
@ -88,7 +88,10 @@ func registerAPIRouter(router *mux.Router) {
|
|||||||
for _, domainName := range globalDomainNames {
|
for _, domainName := range globalDomainNames {
|
||||||
if IsKubernetes() {
|
if IsKubernetes() {
|
||||||
routers = append(routers, apiRouter.MatcherFunc(func(r *http.Request, match *mux.RouteMatch) bool {
|
routers = append(routers, apiRouter.MatcherFunc(func(r *http.Request, match *mux.RouteMatch) bool {
|
||||||
host, _, _ := net.SplitHostPort(getHost(r))
|
host, _, err := net.SplitHostPort(getHost(r))
|
||||||
|
if err != nil {
|
||||||
|
host = r.Host
|
||||||
|
}
|
||||||
// Make sure to skip matching minio.<domain>` this is
|
// Make sure to skip matching minio.<domain>` this is
|
||||||
// specifically meant for operator/k8s deployment
|
// specifically meant for operator/k8s deployment
|
||||||
// The reason we need to skip this is for a special
|
// The reason we need to skip this is for a special
|
||||||
|
Loading…
Reference in New Issue
Block a user