Browse Source

add port 8000 to cors (real safe)

master
Rich Brown 10 months ago
parent
commit
23c11331a6
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      src/index.js

+ 8
- 2
src/index.js View File

@@ -55,14 +55,20 @@ app.use((req, res, next) => {
console.log(req.session.cookie.expires);
} else {
// eslint-disable-next-line no-console
console.log('no req.session.cookie');
// console.log('no req.session.cookie');
}
next();
});

// app.use(compression());

const corsArrays = ['https://post.porknachos.com', 'http://localhost:3000', 'https://dashboard.porknachos.com'];
const corsArrays = [
'https://post.porknachos.com',
'http://localhost:8000',
'http://localhost:3000',
'https://dashboard.porknachos.com',
];

const corsOptions = {
origin: corsArrays,
credentials: true,


Loading…
Cancel
Save