Skip to content
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

Cleanup http #12424

Merged
merged 5 commits into from Feb 15, 2018
Merged

Cleanup http #12424

merged 5 commits into from Feb 15, 2018

Conversation

balloob
Copy link
Member

@balloob balloob commented Feb 15, 2018

Description:

With aiohttp 3 around the corner, it was time to clean up our HTTP component. Splits out a bunch of stuff into middlewares and also makes sure that the auth middleware can no longer be changed on the fly. It will always use the initial used values.

Also cleaned up the tests related to HTTP.

Related issue (if applicable): solves some deprecation warnings for #12358

Example entry for configuration.yaml (if applicable):

http:

Checklist:

  • The code change is tested and works locally.

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • Tests have been added to verify that the new code works.

KEY_TRUSTED_NETWORKS, KEY_USE_X_FORWARDED_FOR, HTTP_HEADER_X_FORWARDED_FOR)
from homeassistant.components.http.auth import setup_auth
from homeassistant.components.http.real_ip import setup_real_ip
from homeassistant.components.http.const import KEY_AUTHENTICATED, KEY_REAL_IP

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'homeassistant.components.http.const.KEY_REAL_IP' imported but unused

@pvizeli pvizeli merged commit f32911d into dev Feb 15, 2018
@pvizeli pvizeli deleted the cleanup-http branch February 15, 2018 21:06
@balloob balloob mentioned this pull request Feb 22, 2018
@home-assistant home-assistant locked and limited conversation to collaborators May 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants