Last active
August 19, 2019 15:37
-
-
Save mkmms/6b235edc19f010fdc1468587f07e5851 to your computer and use it in GitHub Desktop.
@nuxt/apollo Cors Issue Apollo config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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