fix: enable cors in server

This commit is contained in:
MTG2000
2022-06-05 20:54:14 +03:00
parent 8a4b39465a
commit cd46e5a8c1
2 changed files with 6 additions and 5 deletions

View File

@@ -27,10 +27,11 @@ const server = new ApolloServer({
});
const apolloHandler = server.createHandler({
cors: {
origin: "*",
methods: "*",
credentials: true,
expressGetMiddlewareOptions: {
cors: {
origin: true,
credentials: true,
}
},
});

View File

@@ -1,5 +1,5 @@
const CONSTS = {
apiEndpoint: process.env.REACT_APP_API_END_POINT ?? '/.netlify/functions'
apiEndpoint: 'http://localhost:8888/.netlify/functions'
}
export default CONSTS;