mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2024-10-01 03:35:38 -04:00
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:
parent
0586503b7a
commit
04f1a16eb7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user