Skip to content

Commit b124595

Browse files
authored
Update api.go
1 parent 15d77e7 commit b124595

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/api.go

+2-1
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)