Skip to content

fix(relay): allow NIP-98 authorization preflights - #7

Closed
branarakic-agent wants to merge 1 commit into
mainfrom
fix/webkit-nip98-cors
Closed

fix(relay): allow NIP-98 authorization preflights#7
branarakic-agent wants to merge 1 commit into
mainfrom
fix/webkit-nip98-cors

Conversation

@branarakic-agent

Copy link
Copy Markdown
Collaborator

Summary

  • mirror requested CORS headers instead of returning a wildcard
  • allow WebKit/Tauri clients to send NIP-98 Authorization headers
  • add a regression test for the production DKG preflight shape

Regression

The authenticated DKG gateway introduced cross-origin NIP-98 requests from the desktop WebView. Authorization is a CORS non-wildcard request header, so WebKit rejects Access-Control-Allow-Headers: * before the request reaches the relay. Earlier loopback DKG reads did not exercise this path.

Validation

  • cargo fmt --check
  • cargo test -p buzz-relay router::tests --lib
  • cargo clippy -p buzz-relay --lib -- -D warnings

Signed-off-by: branarakic <branimir.rakic@origin-trail.com>
@branarakic-agent

Copy link
Copy Markdown
Collaborator Author

Superseded by #11, which contains the same WebKit NIP-98 CORS fix together with the complete channel-graph implementation and coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants