Open ronjunevaldoz opened 1 day ago
Hi!
This behavior is to be expected in the browser - your server needs to configure CORS and reply with the necessary Access-Control-Allow-*
headers. The OPTIONS
request you see is the preflight one.
Hi!
This behavior is to be expected in the browser - your server needs to configure CORS and reply with the necessary
Access-Control-Allow-*
headers. TheOPTIONS
request you see is the preflight one.
Hello, Access-Control-Allow is already configured on server side (ktor server) and its working properly using Android, iOS and Desktop. The only issue is when executed uaing WASM web
CORS is only a browser mechanism so it is expected that it doesn't impact Android and other non-browser based clients. I am not familiar with how to implement CORS with Ktor but in your log above, it looks like the results to the OPTION preflight request is 403 - I think this indicates some misconfiguration, as it should probably reply with 200 to go on.
Version
4.0.0
Summary
This error only encountered on WASM but not in Android, iOS & Desktop. When I execute a query or mutation with
Authorization
header it gives OPTIONS request method that caused CORS blocked.Steps to reproduce the behavior
Setup ApolloClient with custom interceptor.
Given:
Logs
Server logs
When
Authorization
header is added, the requested method became OPTIONS instead of POST (WASM only)?