internal: fix CSRF error caused by Host header

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-02-09 14:34:48 +01:00
parent e70e6b84c2
commit 015810a2fd

View file

@ -18,7 +18,6 @@ func (ws *WebServer) configureProxy() {
director := func(req *http.Request) {
req.URL.Scheme = u.Scheme
req.URL.Host = u.Host
req.Host = u.Host
if _, ok := req.Header["User-Agent"]; !ok {
// explicitly disable User-Agent so it's not set to default value
req.Header.Set("User-Agent", "")