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,7 +89,8 @@ function exit (reason) {
|
||||
|
||||
const app = express()
|
||||
|
||||
app.use(function (req, res, next) {
|
||||
if (!process.env.NS_DEVEL) {
|
||||
app.use(function (req, res, next) {
|
||||
if (req.secure) {
|
||||
next()
|
||||
} else {
|
||||
@@ -100,7 +101,8 @@ app.use(function (req, res, next) {
|
||||
res.redirect('https://' + req.headers.host + req.url)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
// https://github.com/expressjs/cors#configuration-options
|
||||
app.use(cors({
|
||||
credentials: true,
|
||||
|
||||
Reference in New Issue
Block a user