custom_components/bahmcloud_store/store.py aktualisiert
This commit is contained in:
@@ -233,15 +233,17 @@ class BahmcloudStore:
|
||||
|
||||
class _StaticView(HomeAssistantView):
|
||||
"""
|
||||
Serves panel assets from: custom_components/bahmcloud_store/panel/
|
||||
IMPORTANT:
|
||||
Custom Panel JS modules are loaded WITHOUT Authorization headers.
|
||||
Therefore static panel assets must be publicly accessible (no auth).
|
||||
|
||||
URLs:
|
||||
Serves:
|
||||
/api/bahmcloud_store_static/index.html
|
||||
/api/bahmcloud_store_static/panel.js
|
||||
/api/bahmcloud_store_static/app.js
|
||||
/api/bahmcloud_store_static/styles.css
|
||||
"""
|
||||
requires_auth = True
|
||||
requires_auth = False
|
||||
name = "bahmcloud_store_static"
|
||||
url = "/api/bahmcloud_store_static/{path:.*}"
|
||||
|
||||
@@ -268,6 +270,10 @@ class _StaticView(HomeAssistantView):
|
||||
|
||||
|
||||
class _APIListView(HomeAssistantView):
|
||||
"""
|
||||
Store API MUST stay protected.
|
||||
UI loads data via fetch() with HA auth handled by frontend.
|
||||
"""
|
||||
requires_auth = True
|
||||
name = "bahmcloud_store_api"
|
||||
url = "/api/bahmcloud_store"
|
||||
|
||||
Reference in New Issue
Block a user