|
| None | __init__ (self, HomeAssistant hass, str|None ssl_certificate, str|None ssl_peer_certificate, str|None ssl_key, list[str]|None server_host, int server_port, list[IPv4Network|IPv6Network] trusted_proxies, str ssl_profile) |
| |
| None | async_initialize (self, *list[str] cors_origins, bool use_x_forwarded_for, int login_threshold, bool is_ban_enabled, bool use_x_frame_options) |
| |
| None | async_register_static_paths (self, Collection[StaticPathConfig] configs) |
| |
| None | register_redirect (self, str url, StrOrURL redirect_to, *type[HTTPRedirection] redirect_exc=HTTPMovedPermanently) |
| |
| None | register_static_path (self, str url_path, str path, bool cache_headers=True) |
| |
| None | register_view (self, HomeAssistantView|type[HomeAssistantView] view) |
| |
| None | start (self) |
| |
| None | stop (self) |
| |
HTTP server for Home Assistant.
Definition at line 345 of file __init__.py.
◆ __init__()
| None homeassistant.components.http.HomeAssistantHTTP.__init__ |
( |
|
self, |
|
|
HomeAssistant |
hass, |
|
|
str | None |
ssl_certificate, |
|
|
str | None |
ssl_peer_certificate, |
|
|
str | None |
ssl_key, |
|
|
list[str] | None |
server_host, |
|
|
int |
server_port, |
|
|
list[IPv4Network | IPv6Network] |
trusted_proxies, |
|
|
str |
ssl_profile |
|
) |
| |
Initialize the HTTP Home Assistant server.
Definition at line 348 of file __init__.py.
◆ _async_register_static_paths()
| None homeassistant.components.http.HomeAssistantHTTP._async_register_static_paths |
( |
|
self, |
|
|
Collection[StaticPathConfig] |
configs, |
|
|
dict[str, CachingStaticResource | web.StaticResource | None] |
resources |
|
) |
| |
|
private |
Register a folders or files to serve as a static path.
Definition at line 483 of file __init__.py.
◆ _create_emergency_ssl_context()
| ssl.SSLContext homeassistant.components.http.HomeAssistantHTTP._create_emergency_ssl_context |
( |
|
self | ) |
|
|
private |
Create an emergency ssl certificate so we can still startup.
Definition at line 570 of file __init__.py.
◆ _create_ssl_context()
| ssl.SSLContext | None homeassistant.components.http.HomeAssistantHTTP._create_ssl_context |
( |
|
self | ) |
|
|
private |
◆ _make_static_resources()
Create a list of static resources.
Definition at line 460 of file __init__.py.
◆ async_initialize()
| None homeassistant.components.http.HomeAssistantHTTP.async_initialize |
( |
|
self, |
|
|
*list[str] |
cors_origins, |
|
|
bool |
use_x_forwarded_for, |
|
|
int |
login_threshold, |
|
|
bool |
is_ban_enabled, |
|
|
bool |
use_x_frame_options |
|
) |
| |
◆ async_register_static_paths()
| None homeassistant.components.http.HomeAssistantHTTP.async_register_static_paths |
( |
|
self, |
|
|
Collection[StaticPathConfig]
|
configs |
|
) |
| |
Register a folder or file to serve as a static path.
Definition at line 473 of file __init__.py.
◆ register_redirect()
| None homeassistant.components.http.HomeAssistantHTTP.register_redirect |
( |
|
self, |
|
|
str |
url, |
|
|
StrOrURL |
redirect_to, |
|
|
*type[HTTPRedirection] |
redirect_exc = HTTPMovedPermanently |
|
) |
| |
Register a redirect with the server.
If given this must be either a string or callable. In case of a
callable it's called with the url adapter that triggered the match and
the values of the URL as keyword arguments and has to return the target
for the redirect, otherwise it has to be a string with placeholders in
rule syntax.
Definition at line 435 of file __init__.py.
◆ register_static_path()
| None homeassistant.components.http.HomeAssistantHTTP.register_static_path |
( |
|
self, |
|
|
str |
url_path, |
|
|
str |
path, |
|
|
bool |
cache_headers = True |
|
) |
| |
Register a folder or file to serve as a static path.
Definition at line 505 of file __init__.py.
◆ register_view()
| None homeassistant.components.http.HomeAssistantHTTP.register_view |
( |
|
self, |
|
|
HomeAssistantView | type[HomeAssistantView] |
view |
|
) |
| |
Register a view with the WSGI server.
The view argument must be a class that inherits from HomeAssistantView.
It is optional to instantiate it before registering; this method will
handle it either way.
Definition at line 414 of file __init__.py.
◆ start()
| None homeassistant.components.http.HomeAssistantHTTP.start |
( |
|
self | ) |
|
◆ stop()
| None homeassistant.components.http.HomeAssistantHTTP.stop |
( |
|
self | ) |
|
◆ app
| homeassistant.components.http.HomeAssistantHTTP.app |
◆ context
| homeassistant.components.http.HomeAssistantHTTP.context |
◆ hass
| homeassistant.components.http.HomeAssistantHTTP.hass |
◆ runner
| homeassistant.components.http.HomeAssistantHTTP.runner |
◆ server_host
| homeassistant.components.http.HomeAssistantHTTP.server_host |
◆ server_port
| homeassistant.components.http.HomeAssistantHTTP.server_port |
◆ site
| homeassistant.components.http.HomeAssistantHTTP.site |
◆ ssl_certificate
| homeassistant.components.http.HomeAssistantHTTP.ssl_certificate |
◆ ssl_key
| homeassistant.components.http.HomeAssistantHTTP.ssl_key |
◆ ssl_peer_certificate
| homeassistant.components.http.HomeAssistantHTTP.ssl_peer_certificate |
◆ ssl_profile
| homeassistant.components.http.HomeAssistantHTTP.ssl_profile |
◆ trusted_proxies
| homeassistant.components.http.HomeAssistantHTTP.trusted_proxies |
The documentation for this class was generated from the following file: