mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-19 20:32:35 +02:00
added response message on invalid api request host
This commit is contained in:
parent
c7208c90c6
commit
a78dba5191
1 changed files with 1 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue