mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-17 23:03:49 +01:00
added response message on invalid api request host
This commit is contained in:
@@ -44,6 +44,7 @@ func checkHost(f http.HandlerFunc) http.HandlerFunc {
|
||||
if r.Host != common.APIHTTPAddr {
|
||||
Logger.Warnf("invalid request to API server with host: %s, expected: %s", r.Host, common.APIHTTPAddr)
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
w.Write([]byte("invalid request"))
|
||||
return
|
||||
}
|
||||
f(w, r)
|
||||
|
||||
Reference in New Issue
Block a user