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
Describe the bug
Unable to use Quicknode rpc url with stellar-sdk in browser because it throws CORS error related to sdk including "X-Client-Version" headers in RPC requests
What version are you on?
11.3.0
To Reproduce
Steps to reproduce the behavior:
setup stellar-sdk with a quicknode rpc url in a Browser JS proj
try to execute any interaction for example
const rpc = new SorobanRpc.Server(url);
const data = await rpc.getLatestLedger();
CORS error will show up :
Access to XMLHttpRequest at URL from origin HOST has been blocked by CORS policy: Request header field x-client-version is not allowed by Access-Control-Allow-Headers in preflight
Expected behavior
Usual RPC network requests to work without error
Additional context
Did some debugging and reproducing the request with fetch() but removing X-Client-Version and X-Client-Name headers seemed to fix the issue
This is likely an issue with the way Quicknode sets up their RPC server but putting it here first for better traceability
Describe the bug
Unable to use Quicknode rpc url with stellar-sdk in browser because it throws CORS error related to sdk including "X-Client-Version" headers in RPC requests
What version are you on?
11.3.0
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Usual RPC network requests to work without error
Additional context
X-Client-Version
andX-Client-Name
headers seemed to fix the issueThe text was updated successfully, but these errors were encountered: