internal: fix CSRF error caused by Host header
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
787f02d5dc
commit
e194715c3e
|
@ -18,7 +18,6 @@ func (ws *WebServer) configureProxy() {
|
||||||
director := func(req *http.Request) {
|
director := func(req *http.Request) {
|
||||||
req.URL.Scheme = u.Scheme
|
req.URL.Scheme = u.Scheme
|
||||||
req.URL.Host = u.Host
|
req.URL.Host = u.Host
|
||||||
req.Host = u.Host
|
|
||||||
if _, ok := req.Header["User-Agent"]; !ok {
|
if _, ok := req.Header["User-Agent"]; !ok {
|
||||||
// explicitly disable User-Agent so it's not set to default value
|
// explicitly disable User-Agent so it's not set to default value
|
||||||
req.Header.Set("User-Agent", "")
|
req.Header.Set("User-Agent", "")
|
||||||
|
|
Reference in New Issue