Commit graph

155 commits

Author SHA1 Message Date
epenet
454bdcc00d
Expose http constants in root (#78267) 2022-09-12 18:41:18 +02:00
epenet
16900dcef1
Make Store a generic class (#74617) 2022-07-09 22:32:57 +02:00
Marc Mueller
53245c6523
Update pylint to 2.13.0 (#68656) 2022-03-25 15:14:48 -07:00
Franck Nijhof
3afadf8adb
Revert "Block peer certs on supervisor" (#67104) 2022-02-23 12:32:07 +01:00
Paulus Schoutsen
938b64081b
Block peer certs on supervisor (#66837)
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
2022-02-22 13:59:40 -08:00
J. Nick Koston
3bf2be1765
Startup with an emergency self signed cert if the ssl certificate cannot be loaded (#66707) 2022-02-18 16:08:26 -08:00
Marc Mueller
370832f527
Fix http typing (#66506) 2022-02-14 13:40:31 +01:00
Franck Nijhof
fa09cf663e
Update black to 22.1.0 (#65788) 2022-02-05 14:19:37 +01:00
Paulus Schoutsen
63f8e437ed
Add Home Assistant Content user (#64337) 2022-01-21 10:06:39 -08:00
epenet
40e77e2af0
Fix type hint in http register_view (#63385)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-04 21:25:16 -08:00
Paulus Schoutsen
914f7f85ec
Add local only users (#57598) 2021-11-29 14:01:03 -08:00
Simone Chemelli
5fc51130ea
Replace util.get_local_ip in favor of components.network.async_get_source_ip() - part 4 (#58669)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-11-15 09:18:57 -08:00
Bram Kragten
28c07f5c43
Fix CORS (#59360)
* Fix CORS

* rename

* Update view.py
2021-11-09 18:30:51 +01:00
Franck Nijhof
cdd1f6b2f0
Always load middle to handle forwarded proxy data (#51332) 2021-06-01 09:38:55 -07:00
Paulus Schoutsen
bd0373388d
Trusted networks auth provider warns if detects a requests with x-forwarded-for header while the http integration is not configured for reverse proxies (#51319)
* Trusted networks auth provider to require http integration configured for proxies to allow logging in with requests with x-forwarded-for header

* Make it a warning
2021-06-01 12:51:44 +02:00
Ruslan Sayfutdinov
ce15f28642
Add missing type hints in http component (#50411) 2021-05-10 14:30:47 -07:00
J. Nick Koston
a4432557d3
Defer writing http config until after startup has calmed down (#50000) 2021-05-02 19:48:49 -10:00
J. Nick Koston
81e6ad0744
Replace http startup logic with async_when_setup_or_start (#48784) 2021-04-13 14:10:58 -07:00
Marc Mueller
5cdd945f44
Update typing 08 (#48058) 2021-03-18 09:25:40 +01:00
Bram Kragten
e3105c7eb1
Revert CORS changes for my home assistant (#47064)
* Revert CORS changes for my home assistant

* Update test_init.py

* Update test_init.py
2021-02-25 15:28:22 -08:00
Franck Nijhof
22389043eb
Remove base_url fallback (#46316) 2021-02-10 14:31:11 +01:00
Bram Kragten
6f446cf627
Add my component (#46058)
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-02-08 14:44:46 +01:00
Franck Nijhof
f047d04882
Add filtering 2021-01-14 20:02:01 +01:00
Paulus Schoutsen
5ecaa9e4d2
Add log message server startup (#43177) 2020-11-13 14:39:50 +01:00
Paulus Schoutsen
fbbfd46fb8
Add .well-known/password-change (#39613) 2020-09-03 18:13:33 +02:00
Franck Nijhof
cc4ebc925c
Improve X-Forwarded-* request headers handling (#38696)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-08-11 22:57:50 +02:00
Franck Nijhof
20710d8605
Add current request context to get_url helper (#38602) 2020-08-09 14:07:31 +02:00
Stefan Agner
c2f5831181
Support dual stack IP support (IPv4 and IPv6) (#38046)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-08-04 15:34:23 +02:00
J. Nick Koston
00387bf870
Make the frontend available sooner (Part 2 of 2) (#36264)
* Part 1 of 2 (no breaking changes in part 1).

When integrations configured via the UI block startup or fail to start,
the webserver can remain offline which make it is impossible
to recover without manually changing files in
.storage since the UI is not available.

This change is the foundation that part 2 will build on
and enable a listener to start the webserver when the frontend
is finished loading.

Frontend Changes (home-assistant/frontend#6068)

* Part 1 of 2 (no breaking changes in part 1).

When integrations configured via the UI block startup or fail to start,
the webserver can remain offline which make it is impossible
to recover without manually changing files in
.storage since the UI is not available.

This change is the foundation that part 2 will build on
and enable a listener to start the webserver when the frontend
is finished loading.

Frontend Changes (home-assistant/frontend#6068)

* Part 2 of 2 (breaking changes in part 2).

When integrations configured via the UI block startup or fail to start,
the webserver can remain offline which make it is impossible
to recover without manually changing files in
.storage since the UI is not available.

This change is the foundation that part 2 will build on
and enable a listener to start the webserver when the frontend
is finished loading.

* bump timeout to 1800s, adjust comment

* bump timeout to 1800s, adjust comment

* bump timeout to 4h

* bump timeout to 4h

* remove timeout failsafe

* remove timeout failsafe

* and the test

* and the test

* find the test that needs mocking

* find the test that needs mocking

* Revert "find the test that needs mocking"

This reverts commit 064e7787a8e9bc65df965530726fa1c41f8bcd36.

* Revert "find the test that needs mocking"

This reverts commit 064e7787a8e9bc65df965530726fa1c41f8bcd36.

* fix the one that was missed due to the conflict
2020-06-02 17:02:09 -05:00
J. Nick Koston
578d4a9b6a
Make the frontend available sooner (Part 1 of 2) (#36263)
* Part 1 of 2 (no breaking changes in part 1).

When integrations configured via the UI block startup or fail to start,
the webserver can remain offline which make it is impossible
to recover without manually changing files in
.storage since the UI is not available.

This change is the foundation that part 2 will build on
and enable a listener to start the webserver when the frontend
is finished loading.

Frontend Changes (home-assistant/frontend#6068)

* Address review comments

* bump timeout to 1800s, adjust comment

* bump timeout to 4h

* remove timeout failsafe

* and the test
2020-06-02 13:54:11 -05:00
Paulus Schoutsen
acbffb511d
Fix base_url extract stack (#36331)
* Fix base_url extract stack

* Fix tests
2020-06-01 11:44:45 -07:00
Pascal Vizeli
ed014e3c96
Revert "Ensure frontend is available if integrations fail to start - Part 1 of 2 (#36093)" (#36251)
This reverts commit fbe7b4ddfa.
2020-05-29 10:18:39 +02:00
J. Nick Koston
fbe7b4ddfa
Ensure frontend is available if integrations fail to start - Part 1 of 2 (#36093)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-05-28 21:09:07 -07:00
Franck Nijhof
e3e3a113e9
async_get_url -> get_url (#35382) 2020-05-08 21:53:28 +02:00
Franck Nijhof
e56dd8ed50
Detect use of deprecated base_url (#35353)
* Detect use of deprecated base_url

* Update get_url helper

* Update core migration

* Migrate all tests
2020-05-08 17:52:32 +02:00
Franck Nijhof
2223592486
Add get_url helper, deprecate base_url (#35224) 2020-05-08 02:29:47 +02:00
Paulus Schoutsen
33361f8580
Fix HTTP config serialization (#31319) 2020-01-30 09:47:16 -08:00
Paulus Schoutsen
5fdc60e067
Add Safe Mode (#30723)
* Store last working HTTP settings

* Add safe mode

* Fix tests

* Add cloud to safe mode

* Update logging text

* Fix camera tests leaving files behind

* Make emulated_hue tests not leave files behind

* Make logbook tests not leave files behind

* Make tts tests not leave files behind

* Make image_processing tests not leave files behind

* Make manual_mqtt tests not leave files behind
2020-01-14 13:03:02 -08:00
Pascal Vizeli
a4c1114c8e Set body size for Proxy / streams to 16mb (#30608) 2020-01-09 11:09:34 +01:00
springstan
04722fdd63 Move imports to top for http (#29500) 2019-12-05 13:42:09 +01:00
Ville Skyttä
d88ca0f5cb Lint exclusions (#28655)
* Remove malformed pylint disable markers

* Remove some unused imports

* Remove some unneeded lint exclusions

* Remove more unneeded lint exclusions

* Add specific codes to all noqa's
2019-11-16 10:22:07 +01:00
Paulus Schoutsen
3231e22ddf
Remove direct authentication via trusted networks or API password (#27656)
* Remove direct authentication via trusted networks and API password

* Fix tests
2019-10-14 14:56:45 -07:00
Paulus Schoutsen
e866d769e8
Google Assistant Local SDK (#27428)
* Local Google

* Fix test

* Fix tests
2019-10-13 14:16:27 -07:00
Franck Nijhof
decf13b948 Use literal string interpolation in core (f-strings) (#26166) 2019-08-23 09:53:33 -07:00
Ville Skyttä
b738082dad Type check various base components (#25878)
* Type check various component base classes, disabling bunch of checks for now

* Type hint fixes

* Help mypy out some

* Add more type hints
2019-08-11 20:38:18 -07:00
Paulus Schoutsen
57f84cbbaa Update HTTP defaults (#25702)
* Update HTTP defaults

* Fix tests
2019-08-05 08:24:54 +02:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Paulus Schoutsen
297cd3dc13
Fix deprecation warning in test (#25506) 2019-07-26 17:40:40 -07:00
Franck Nijhof
31f569ada9 Batch of Component(s) -> Integration(s) (#24972) 2019-07-05 15:24:26 -07:00
Paulus Schoutsen
f77514c6f2
Check cloud trusted proxies (#24395) 2019-06-07 23:08:55 -07:00