Skip to content

Commit

Permalink
Updated cors config
Browse files Browse the repository at this point in the history
  • Loading branch information
autsada committed Jun 22, 2021
1 parent 66adcb9 commit e0a6793
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"apollo-server-express": "^2.12.0",
"bcryptjs": "^2.4.3",
"cookie-parser": "^1.4.5",
"cors": "^2.8.5",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"graphql": "^14.6.0",
Expand Down
9 changes: 1 addition & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import express from 'express'
import mongoose from 'mongoose'
import passport from 'passport'
import cookieParser from 'cookie-parser'
import cors from 'cors'

import createServer from './createServer'
import { PassportFB, PassportGoogle } from './passport'
Expand Down Expand Up @@ -38,12 +37,6 @@ const startServer = async () => {
)

const app = express()
app.use(
cors({
origin: FRONTEND_URI,
credentials: true,
})
)
app.use(cookieParser())

// Facebook login route
Expand Down Expand Up @@ -80,7 +73,7 @@ const startServer = async () => {

server.applyMiddleware({
app,
// cors: { origin: FRONTEND_URI, credentials: true },
cors: { origin: FRONTEND_URI, credentials: true },
})

app.listen(
Expand Down

0 comments on commit e0a6793

Please sign in to comment.