Simplify CORS

This commit is contained in:
Barry Low committed 2019-01-17 23:50:59 -08:00
1 parent 3956868bd8
commit d8f5400b4c
1 file changed
+2 -1
+2 -1
View File
@@ -203,7 +203,8 @@ async function run () {
callback(null, corsOptions)
}
server.applyMiddleware({ app, cors: corsOptionsDelegate })
// server.applyMiddleware({ app, cors: corsOptionsDelegate })
server.applyMiddleware({ app, cors: { origin: true, credentials: true, methods:'GET,PUT,POST,DELETE,OPTIONS'}})
app.listen(4100)
logger.info(`Server running. Open ${process.env.GRAPHQL_API_URL} to run queries.`)