Skip to content

Commit ab54551

Browse files
committed
Merge branch 'master' of github.com:Go-phie/gophie
2 parents 34c4cfa + b124595 commit ab54551

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/api.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ func authIP(handler http.HandlerFunc) http.HandlerFunc {
4747
originURL, _ := url.Parse(r.Header.Get("Origin"))
4848
if err == nil && (contains(WhiteListedHosts, ip) || contains(WhiteListedHosts, "*") || contains(WhiteListedHosts, originURL.Host)) {
4949
handler.ServeHTTP(w, r)
50-
}
50+
} else {
5151
log.Debug("Rejecting Request: Host not whitelisted")
5252
accessDeniedHandler(w, r)
53+
}
5354
}
5455
}
5556

0 commit comments

Comments
 (0)