-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure hassio does not do blocking I/O to get forwarded host #126885
base: dev
Are you sure you want to change the base?
Conversation
request.host can fallback to doing blocking I/O because of aio-libs/aiohttp#9308
Hey there @home-assistant/supervisor, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
if forward_host := request.headers.get( | ||
hdrs.X_FORWARDED_HOST | ||
) or request.headers.get(hdrs.HOST): | ||
headers[hdrs.X_FORWARDED_HOST] = forward_host |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we raise here if forward_host
is None
?
Can that ever happen
I think this can never happen for hassio so its not something to worry about |
I think we would have to forward http/1.0 with no host set for this to happen...so not never but very unlikely If some addon messes it up it could cause core to do blocking I/O so probably worth protecting against |
Proposed change
request.host can fallback to doing blocking I/O because of aio-libs/aiohttp#9308
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: