I’m trying to access my graphQL server on my production server but getting the CORS error.
The request url is: https://mov****.at/graphql
In my index.mjs
where I start the Apollo server I have CORS defined as so:
app.use(
'/graphql',
cors({ origin: ['https://mov***.at', 'https://mov***.at/graphql', 'https://studio.apollographql.com'] }),
bodyParser.json(),
expressMiddleware(server),
);
And in my graphql.module.ts
I have the uri defined like so const uri = 'https://mov***.at/graphql';
I’ve read > https://www.apollographql.com/docs/apollo-server/security/cors/#configuring-cors-options-for-apollo-server but I’m not resolving the issue.
1
What CORS error?
13 mins ago