Skip to content

Instantly share code, notes, and snippets.

@mkmms
Last active August 19, 2019 15:37
Show Gist options
  • Save mkmms/6b235edc19f010fdc1468587f07e5851 to your computer and use it in GitHub Desktop.
Save mkmms/6b235edc19f010fdc1468587f07e5851 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