c2-core: add CORS middleware so the browser can call the REST API (#110)
The Archive page's GET /calls/search failed its CORS preflight (OPTIONS -> 405, no Access-Control-* headers). Allow the app origin(s) explicitly for the standard methods and the authorization/content-type headers. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbknwttzou4s46PAykmtix
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
bccb3e0316
commit
d60fef67ad
@@ -33,6 +33,13 @@ SUMMARY_INTERVAL_MINUTES=15
|
||||
CORRELATION_WINDOW_HOURS=4
|
||||
EMBEDDING_SIMILARITY_THRESHOLD=0.82
|
||||
|
||||
# Browser origins allowed to call this API cross-origin (JSON list). The only
|
||||
# browser caller is the frontend's Archive page (GET /calls/search). Set this
|
||||
# to the exact origin the frontend is served from — scheme + host, no path.
|
||||
# Defaults to https://drb.cusano.net. A "*" entry works for local dev but is
|
||||
# logged as a probable misconfiguration and never gets a credentialed response.
|
||||
CORS_ORIGINS=["https://drb.cusano.net"]
|
||||
|
||||
# Fleet-wide token edge nodes present as X-Enrollment-Token on first boot
|
||||
# (POST /nodes/enroll). Shared across every node — NOT a per-node secret.
|
||||
# Generate with: openssl rand -hex 32
|
||||
|
||||
Reference in New Issue
Block a user