Make sure use_x_forward_for and trusted_proxies must config together#15804
Merged
balloob merged 2 commits intohome-assistant:devfrom Aug 3, 2018
Merged
Conversation
houndci-bot
reviewed
Aug 3, 2018
tests/components/http/test_init.py
Outdated
| http.CONF_TRUSTED_PROXIES: ['127.0.0.1'] | ||
| } | ||
| }) is not True | ||
|
|
| assert await async_setup_component(hass, 'http', { | ||
| 'http': { | ||
| http.CONF_TRUSTED_PROXIES: ['127.0.0.1'] | ||
| } |
There was a problem hiding this comment.
continuation line missing indentation or outdented
| """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.
continuation line missing indentation or outdented
5385b67 to
8532412
Compare
Contributor
Author
|
I don't have proxy server setup, need volunteer to test it. |
balloob
approved these changes
Aug 3, 2018
Merged
Contributor
Author
|
@brunohorta82 please do not use pull request to raise issue, create an issue and fill in the issue template. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description:
Per
httpcomponent 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: