daemon: Remove the host header in the main router.

The host header can cause confusion since we are forwarding the request
as is in the main router.

Remove it since aiohttp will create a sane new one for us.

This fixes #2.
This commit is contained in:
Damir Jelić 2019-04-02 14:41:22 +02:00
parent 0586503b7a
commit 04f1a16eb7

View File

@ -23,6 +23,7 @@ from nio import (
)
from appdirs import user_data_dir
from json import JSONDecodeError
from multidict import CIMultiDict
@attr.s
@ -57,7 +58,10 @@ class ProxyDaemon:
path = request.path
method = request.method
data = await request.text()
headers = request.headers
headers = CIMultiDict(request.headers)
headers.pop("Host", None)
params = request.query
session = None