proxy: don't panic when no host is specified
This commit is contained in:
parent
4bc7cb1764
commit
d5045e5a1d
1 changed files with 2 additions and 1 deletions
3
main.go
3
main.go
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue