mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-06-05 09:46:29 +00:00
Add current request context to get_url helper documentation (#638)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
d7f8340377
commit
2e1d217eed
@ -33,6 +33,7 @@ The signature of the helper method:
|
||||
def get_url(
|
||||
hass: HomeAssistant,
|
||||
*,
|
||||
require_current_request: bool = False,
|
||||
require_ssl: bool = False,
|
||||
require_standard_port: bool = False,
|
||||
allow_internal: bool = True,
|
||||
@ -46,6 +47,10 @@ def get_url(
|
||||
|
||||
The different parameters of the method:
|
||||
|
||||
- `require_current_request`
|
||||
Require the returned URL to match the URL the user is currently using
|
||||
in their browser. If there is no current request, an error will be raised.
|
||||
|
||||
- `require_ssl`:
|
||||
Require the returned URL to use the `https` scheme.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user