mirror of
https://github.com/Routstr/routstr-core.git
synced 2026-08-09 02:54:37 +00:00
fix: expose Ehbp-Response-Nonce and Ehbp-Encapsulated-Key in CORS
Browser clients need these EHBP protocol headers visible to JavaScript so the Tinfoil SDK can detect and decrypt encrypted responses. Without them, CORS hides the headers, the SDK treats the response as a plaintext proxy error, and users see 'The provider did not respond to this request.' Node.js scripts are unaffected (no CORS enforcement). See ../routstr-chat/TINFOIL_CORS_ISSUE.md for full root-cause analysis.
This commit is contained in:
@@ -264,6 +264,12 @@ app.add_middleware(
|
||||
"x-routstr-cost-usd",
|
||||
"x-routstr-input-cost-msats",
|
||||
"x-routstr-output-cost-msats",
|
||||
# EHBP (Tinfoil) protocol headers must be exposed so browser clients
|
||||
# can detect and decrypt encrypted responses. Without these, the
|
||||
# browser hides them via CORS and the SDK treats the response as a
|
||||
# plaintext proxy error, returning raw ciphertext.
|
||||
"Ehbp-Response-Nonce",
|
||||
"Ehbp-Encapsulated-Key",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user