You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the old Helius architecture, it appears that the Access-Control-Allow-Origin header provided by the RPC proxy was simply propagated back in the response from Helius, preventing CORs issues from occurring on browser-based client applications.
In the new backend architecture, however, the above is no longer the case. Instead, the new architecture now takes the Origin header as provided by browser-based clients and adds it as the Access-Control-Allow-Origin header. In other words, the RPC proxy must either relay Origin headers provided by browser-based client applications, provide an Origin header when proxying browser-based client requests to Helius, or override response headers provided by Helius to include CORs headers (e.g., Access-Control-Allow-Origin) if no Origin is provided.
The text was updated successfully, but these errors were encountered:
deasydoesit
changed the title
Origin header from client not being propagated causing CORs issues in browswer
Origin header from client not being propagated causing CORs issues in browser
Jul 4, 2023
In the old Helius architecture, it appears that the
Access-Control-Allow-Origin
header provided by the RPC proxy was simply propagated back in the response from Helius, preventing CORs issues from occurring on browser-based client applications.In the new backend architecture, however, the above is no longer the case. Instead, the new architecture now takes the
Origin
header as provided by browser-based clients and adds it as theAccess-Control-Allow-Origin
header. In other words, the RPC proxy must either relayOrigin
headers provided by browser-based client applications, provide anOrigin
header when proxying browser-based client requests to Helius, or override response headers provided by Helius to include CORs headers (e.g.,Access-Control-Allow-Origin
) if noOrigin
is provided.helius-rpc-proxy/src/index.ts
Lines 44 to 52 in fb22b5e
The text was updated successfully, but these errors were encountered: