Hi,
I’m currently running 2 apps:
- Nuxt app in SPA mode with Apollo Client
- Netlify Lambda + Apollo Server Lambda
The nuxt app tries to connect to the apollo functions app, but I’m getting CORS errors locally and when I deploy the app. The graphql playground of the api does work though.
Both the Nuxt app and Apollo functions are completely separate apps with their own domains, but both running on Netlify (eg: myapi.netlify.app and mynuxtapp.netlify.app). somehow I’m getting CORS errors locally using netlify-lambda serve and when deployed.
Apollo has been configured with CORS on like this:
cors: {
origin: '*',
credentials: true
},
When trying to connect with my app with just Apollo Server locally it works.
Any ideas?