mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-18 14:46:30 +00:00
Do not let aiohttp add a Content-Type header (#4038)
* Do not let aiohttp add a Content-Type header aiohttp adds a Content-Type header by default, as well as other headers. This may usually be convenient, but it breaks APIs that explicitly ask for no content type header, for instance on post requests with an empty body. Since ingress is proxying the requests from the browser to the add-on, it should avoid modifying them. I only skip this header auto generation because it actually breaks the Adguard add-on. - https://github.com/hassio-addons/addon-adguard-home/issues/359 I haven't tested this yet. * Use headers constant
This commit is contained in:
parent
54dfba1faa
commit
9abf38f285
@ -182,6 +182,7 @@ class APIIngress(CoreSysAttributes):
|
||||
allow_redirects=False,
|
||||
data=data,
|
||||
timeout=ClientTimeout(total=None),
|
||||
skip_auto_headers={hdrs.CONTENT_TYPE},
|
||||
) as result:
|
||||
headers = _response_header(result)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user