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
Description: From our react client, we started sending apollographql-client-name & apollographql-client-version headers for better client awareness in Apollo Engine.
Access to fetch at 'https://something.com/graphql' from origin 'http://localhost:3000' has been blocked by CORS policy: Request header field apollographql-client-name is not allowed by Access-Control-Allow-Headers in preflight response.
We receive following above CORS error. We enabled cors on Apollo Server through express middleware by passing cors: true. For some reason, this changes are not making any difference. We continue to receive above error.
We had kubernetes ingress layer on top of our Apollo Server and that's what was causing changes not to reflect. After we enabled cors on nginx ingress, we were able to make successful calls.
Package: apollo-server-express
Version:
v2.6.0
Issue: CORS settings aren't taking effect.
Description: From our react client, we started sending
apollographql-client-name
&apollographql-client-version
headers for better client awareness in Apollo Engine.Access to fetch at 'https://something.com/graphql' from origin 'http://localhost:3000' has been blocked by CORS policy: Request header field apollographql-client-name is not allowed by Access-Control-Allow-Headers in preflight response.
We receive
followingaboveCORS
error. We enabledcors
on Apollo Server through express middleware by passingcors: true
. For some reason, this changes are not making any difference. We continue to receive above error.nginx
sitting in front and it does receive request and forwards to Apollo Server.cors: true
enables everything by default?Any inputs and suggestions are welcome!
The text was updated successfully, but these errors were encountered: