fix: Ease dev host name constraints

fix: Ease dev host name constraints
This commit is contained in:
Livio Amstutz 2021-08-27 14:30:36 +02:00 committed by GitHub
commit 86613007d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,6 @@ import (
"errors"
"net/url"
"os"
"strings"
"golang.org/x/text/language"
)
@ -57,9 +56,5 @@ func devLocalAllowed(url *url.URL) bool {
if !b {
return b
}
return url.Scheme == "http" &&
url.Host == "localhost" ||
url.Host == "127.0.0.1" ||
url.Host == "::1" ||
strings.HasPrefix(url.Host, "localhost:")
return url.Scheme == "http"
}