Skip to content

Commit

Permalink
change order of app.use
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian-Webster committed Sep 24, 2024
1 parent 66030fe commit 17b6384
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,11 @@ function appNotActiveTimeOutForDisconnect(socketIdOfTheUser, pubId) {
// Get the objectID type
var ObjectID = require('mongodb').ObjectID;

//Remove this before release
app.use(cors({
origin: '*'
}))

//For accepting post form data
const bodyParser = require('express').json;
app.use(bodyParser());
Expand Down Expand Up @@ -376,10 +381,6 @@ if (process.env.NO_HTTPS) {
});
}

app.use(cors({
origin: '*'
}))


const handlePopularPosts = () => {
handlerStatus = popularPostHandler();
Expand Down

0 comments on commit 17b6384

Please sign in to comment.