Allow loopback origins on any port when configured (http://127.0.0.1:*)
An app installed through Even Hub is served by the Even phone app from http://127.0.0.1:<port>, and the port changed between two launches on a real phone (40315, then another). An exact-origin allow-list therefore cannot admit it. HERMEVEN_ALLOWED_ORIGINS now accepts one wildcard form, the port of a loopback address over http (127.0.0.1, localhost, [::1]), off unless configured. No other wildcard is accepted. CORS remains advisory: every route still requires the device credential. Tests: 224 unit/integration. Not reviewed, not deployed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,10 @@ HERMEVEN_DB_PATH=./data/hermeven.sqlite
|
||||
|
||||
# Exact origins of the page that calls the bridge (comma separated, no wildcards).
|
||||
# Read the real value from Diagnostics -> "Page origin" in the phone page.
|
||||
# One wildcard is accepted: the port of a loopback address, written http://127.0.0.1:*
|
||||
# The Even phone app serves an installed app from http://127.0.0.1:<port> and uses a new port
|
||||
# on every launch, so an installed app needs exactly that entry. A page served from the
|
||||
# bridge's own hostname (the QR sideload path) needs no entry at all.
|
||||
HERMEVEN_ALLOWED_ORIGINS=
|
||||
|
||||
# --- Speech-to-text -----------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user