proxy: don't panic when no host is specified

This commit is contained in:
FireMasterK 2021-01-20 11:47:24 +05:30
parent 4bc7cb1764
commit d5045e5a1d
1 changed files with 2 additions and 1 deletions

View File

@ -40,7 +40,8 @@ func genericHTTPProxy(w http.ResponseWriter, req *http.Request) {
}
if len(host) <= 0 {
log.Panic("No host in query parameters.")
io.WriteString(w, "No host in query parameters.")
return
}
path := req.URL.Path