Skip to content

Commit

Permalink
Update api.go
Browse files Browse the repository at this point in the history
  • Loading branch information
deven96 authored Jun 4, 2020
1 parent 15d77e7 commit b124595
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ func authIP(handler http.HandlerFunc) http.HandlerFunc {
originURL, _ := url.Parse(r.Header.Get("Origin"))
if err == nil && (contains(WhiteListedHosts, ip) || contains(WhiteListedHosts, "*") || contains(WhiteListedHosts, originURL.Host)) {
handler.ServeHTTP(w, r)
}
} else {
log.Debug("Rejecting Request: Host not whitelisted")
accessDeniedHandler(w, r)
}
}
}

Expand Down

0 comments on commit b124595

Please sign in to comment.