mirror of
https://github.com/gogs/gogs.git
synced 2025-12-24 01:00:00 +01:00
netutil: allow using * to match any hostname (#7111)
This commit is contained in:
@@ -52,7 +52,7 @@ func init() {
|
||||
// allowlist).
|
||||
func IsBlockedLocalHostname(hostname string, allowlist []string) bool {
|
||||
for _, allow := range allowlist {
|
||||
if hostname == allow {
|
||||
if hostname == allow || allow == "*" {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user