Commit f38a9cd 1 parent 2c93646 commit f38a9cd Copy full SHA for f38a9cd
File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 11
11
from homeassistant .components .auth import DOMAIN as AUTH_DOMAIN
12
12
from homeassistant .components .auth import indieauth
13
13
from homeassistant .components .auth .login_flow import LoginFlowIndexView
14
+ from homeassistant .components .http import StaticPathConfig
14
15
from homeassistant .components .http .ban import log_invalid_auth
15
16
from homeassistant .components .http .data_validator import RequestDataValidator
16
17
from homeassistant .core import HomeAssistant
@@ -66,10 +67,15 @@ async def async_setup(hass: HomeAssistant, config):
66
67
)
67
68
68
69
# Load script to store tokens in local storage, else we'll re-auth on every browser refresh.
69
- hass .http .register_static_path (
70
- "/auth_header/store-token.js" ,
71
- os .path .join (os .path .dirname (__file__ ), 'store-token.js' ),
72
- )
70
+ await hass .http .async_register_static_paths (
71
+ [StaticPathConfig (
72
+ "/auth_header/store-token.js" ,
73
+ os .path .join (os .path .dirname (__file__ ), 'store-token.js' ),
74
+ True
75
+ )
76
+ ]
77
+ )
78
+
73
79
add_extra_js_url (hass , '/auth_header/store-token.js' )
74
80
75
81
# Inject Auth-Header provider.
You can’t perform that action at this time.
0 commit comments