mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
No https on NS_DEVEL
This commit is contained in:
@@ -89,6 +89,7 @@ function exit (reason) {
|
||||
|
||||
const app = express()
|
||||
|
||||
if (!process.env.NS_DEVEL) {
|
||||
app.use(function (req, res, next) {
|
||||
if (req.secure) {
|
||||
next()
|
||||
@@ -101,6 +102,7 @@ app.use(function (req, res, next) {
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
// https://github.com/expressjs/cors#configuration-options
|
||||
app.use(cors({
|
||||
credentials: true,
|
||||
|
||||
Reference in New Issue
Block a user