Add Access-Control-Expose-Headers: X-Blockchain-Ids, X-Action-Version to make compatibility metadata available to scripts running in the browser.
Update Access-Control-Allow-Headers to include X-Accept-Action-Version and X-Accept-Blockchain-Ids as a preparation step to support client request headers in the future.
Context & Problem
Based on sRFC https://forum.solana.com/t/srfc-31-compatibility-of-blinks-and-actions/1892
Wallets cannot get custom response headers like
X-Action-Version
andX-Blockchain-Ids
by default: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-HeadersSolution
Access-Control-Expose-Headers: X-Blockchain-Ids, X-Action-Version
to make compatibility metadata available to scripts running in the browser.Access-Control-Allow-Headers
to includeX-Accept-Action-Version
andX-Accept-Blockchain-Ids
as a preparation step to support client request headers in the future.