Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
Disable CORS (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechilds authored Feb 9, 2022
1 parent dfbb0be commit 1005707
Show file tree
Hide file tree
Showing 4 changed files with 6,289 additions and 6,150 deletions.
5 changes: 0 additions & 5 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ const path = require('path');
const morgan = require('morgan');
const bodyParser = require('body-parser');
const passport = require('passport');
const cors = require('cors');

// Keep requestCorrelationId middleware as the first middleware. Otherwise we risk losing logs.
const requestCorrelationMiddleware = require('middlewares/requestCorrelationId.js'); // eslint-disable-line id-length
const camelCaseReqMiddleware = require('middlewares/camelCaseRequest.js').camelCaseRequest;
const corsOptions = require('middlewares/cors.js').corsOptions;
const errorHandleMiddleware = require('middlewares/errorHandling.js');
require('middlewares/auth.js');

Expand All @@ -26,9 +24,6 @@ const apps = require('routes/v1/apps.js');

const app = express();

// Handles CORS
app.use(cors(corsOptions));

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use(express.static(path.join(__dirname, 'public')));
Expand Down
21 changes: 0 additions & 21 deletions middlewares/cors.js

This file was deleted.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"body-parser": "^1.18.2",
"camelize-keys": "^1.0.0",
"continuation-local-storage": "^3.2.1",
"cors": "^2.8.5",
"debug": "^4.1.1",
"dotenv": "^8.2.0",
"express": "^4.16.3",
Expand Down
Loading

0 comments on commit 1005707

Please sign in to comment.