mirror of
https://github.com/aljazceru/landscape-template.git
synced 2025-12-27 11:14:33 +01:00
fix: enable cors in server
This commit is contained in:
@@ -27,10 +27,11 @@ const server = new ApolloServer({
|
||||
});
|
||||
|
||||
const apolloHandler = server.createHandler({
|
||||
cors: {
|
||||
origin: "*",
|
||||
methods: "*",
|
||||
credentials: true,
|
||||
expressGetMiddlewareOptions: {
|
||||
cors: {
|
||||
origin: true,
|
||||
credentials: true,
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user