From b03e7482c9ff395d6799b593322ecbdf9c74c2a9 Mon Sep 17 00:00:00 2001 From: Shireesh Anjal <355479+anjalshireesh@users.noreply.github.com> Date: Thu, 10 Aug 2023 22:42:21 +0530 Subject: [PATCH] fix license register error in airgap mode (#4653) --- cmd/license-register.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/license-register.go b/cmd/license-register.go index d62287620b..e522dd70f3 100644 --- a/cmd/license-register.go +++ b/cmd/license-register.go @@ -153,13 +153,18 @@ type SubnetMFAReq struct { } func isPlay(endpoint url.URL) (bool, error) { + playEndpoint := "https://play.min.io" + if globalAirgapped { + return endpoint.String() == playEndpoint, nil + } + aliasIPs, e := net.LookupHost(endpoint.Hostname()) if e != nil { return false, e } aliasIPSet := set.CreateStringSet(aliasIPs...) - playURL, e := url.Parse("https://play.min.io") + playURL, e := url.Parse(playEndpoint) if e != nil { return false, e }