fix: Ease dev host name constraints
fix: Ease dev host name constraints
This commit is contained in:
commit
86613007d0
1 changed files with 1 additions and 6 deletions
|
@ -4,7 +4,6 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"golang.org/x/text/language"
|
"golang.org/x/text/language"
|
||||||
)
|
)
|
||||||
|
@ -57,9 +56,5 @@ func devLocalAllowed(url *url.URL) bool {
|
||||||
if !b {
|
if !b {
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
return url.Scheme == "http" &&
|
return url.Scheme == "http"
|
||||||
url.Host == "localhost" ||
|
|
||||||
url.Host == "127.0.0.1" ||
|
|
||||||
url.Host == "::1" ||
|
|
||||||
strings.HasPrefix(url.Host, "localhost:")
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue