-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
Make sure use_x_forward_for and trusted_proxies must config together #15804
Make sure use_x_forward_for and trusted_proxies must config together #15804
Conversation
tests/components/http/test_init.py
Outdated
http.CONF_TRUSTED_PROXIES: ['127.0.0.1'] | ||
} | ||
}) is not True | ||
|
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.
blank line at end of file
tests/components/http/test_init.py
Outdated
assert await async_setup_component(hass, 'http', { | ||
'http': { | ||
http.CONF_TRUSTED_PROXIES: ['127.0.0.1'] | ||
} |
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.
continuation line missing indentation or outdented
tests/components/http/test_init.py
Outdated
"""Test use_x_forwarded_for must config together with trusted_proxies.""" | ||
assert await async_setup_component(hass, 'http', { | ||
'http': { | ||
http.CONF_TRUSTED_PROXIES: ['127.0.0.1'] |
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.
continuation line missing indentation or outdented
5385b67
to
8532412
Compare
I don't have proxy server setup, need volunteer to test it. |
@brunohorta82 please do not use pull request to raise issue, create an issue and fill in the issue template. |
Description:
Per
http
component document and PR #15204However, we don't have config validation against this requirement.
This PR added config validation to make sure these two options are configured together
Related issue (if applicable): fixes #15544
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Example entry for
configuration.yaml
(if applicable):Checklist:
tox
. Your PR cannot be merged unless tests passIf the code does not interact with devices: