[Extension] RPC preflight 403 — x-client-locale missing from Access-Control-Allow-Headers → "Failed to generate a valid transaction" when Site Access ≠ "On all sites"
#518
SummaryThis is a backend CORS configuration bug on solana-mainnet.phantom.app, not a user-side issue. When the extension's Chrome Site Access is set to anything other than "On all sites", Chrome revokes the *.phantom.app host permission, so popup fetches become regular cross-origin requests and go through a CORS preflight. The preflight OPTIONS to solana-mainnet.phantom.app is rejected with 403 because the extension sends With "On all sites" Chrome skips CORS entirely, so the mismatch is invisible in the default configuration — it only surfaces for users who restrict Site Access (a standard privacy setting). Fix: add Possibly the same class of edge-config issue as #515 (403 from the edge in front of a Phantom API), though I haven't verified that. ExampleNot site-specific — reproduces inside the extension popup itself (swap/send), no dApp involved. Steps to Reproduce
DevTools (inspect popup) → Console: DevTools → Network → the OPTIONS preflight: Server's allow-list (from a passing preflight): Isolated with curl (same Origin, ACRM: POST): Repro command: Workaround: set Site Access back to "On all sites". Phantom VersionChrome extension 26.28.1, Chrome 152.0.0.0, macOS Is there an existing discussion for this?
|
Replies: 1 comment
|
Please reach out to Phantom Support for assistance with this issue. Thanks! |
Please reach out to Phantom Support for assistance with this issue. Thanks!