Skip to content

Instantly share code, notes, and snippets.

@iwatakeshi
Forked from mkmms/nuxt.config.js
Created August 19, 2019 15:37
Show Gist options
  • Save iwatakeshi/f3ed121b6f40a75cf05bafd9ff0c9730 to your computer and use it in GitHub Desktop.
Save iwatakeshi/f3ed121b6f40a75cf05bafd9ff0c9730 to your computer and use it in GitHub Desktop.
@nuxt/apollo Cors Issue Apollo config
apollo: {
clientConfigs: {
default: {
httpEndpoint: `${process.env.API_URL}/graphql`,
httpLinkOptions: {
fetchOptions: {
mode: 'cors' //Cors Needed for external Cross origins, need to allow headers from server
},
credentials: "omit" //must be omit to support application/json content type
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment