diff --git a/functions/graphql/index.js b/functions/graphql/index.js index c31bbef..91e00a7 100644 --- a/functions/graphql/index.js +++ b/functions/graphql/index.js @@ -27,10 +27,11 @@ const server = new ApolloServer({ }); const apolloHandler = server.createHandler({ - cors: { - origin: "*", - methods: "*", - credentials: true, + expressGetMiddlewareOptions: { + cors: { + origin: true, + credentials: true, + } }, }); diff --git a/src/utils/consts/index.ts b/src/utils/consts/index.ts index 558a277..3c1358a 100644 --- a/src/utils/consts/index.ts +++ b/src/utils/consts/index.ts @@ -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; \ No newline at end of file