Skip to content

Commit

Permalink
fixed: ValidateHTTPRequest(); included 127.0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
panorix committed Jan 1, 2022
1 parent 6dd450b commit 335b9a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func (c *Config) ValidateHTTPRequest(w http.ResponseWriter, r *http.Request) (bo

// Host name
rHost := strings.ToLower(strings.Split(r.Host, ":")[0])
if c.Site.HostName != "" && rHost != c.Site.HostName && rHost != "localhost" {
if c.Site.HostName != "" && rHost != c.Site.HostName && rHost != "localhost" && rHost != "127.0.0.1" {
return false, http.StatusBadGateway
}

Expand Down

0 comments on commit 335b9a7

Please sign in to comment.