mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
http mode fixes
This commit is contained in:
@@ -151,6 +151,7 @@ let certs: { key: string; cert: string; ca: string }
|
||||
|
||||
// https://certbot.eff.org/
|
||||
if (
|
||||
!process.env.NS_NO_HTTPS_FORCE &&
|
||||
utils.FileExists(paths.privkeyFile) &&
|
||||
utils.FileExists(paths.fullchainFile) &&
|
||||
utils.FileExists(paths.chainFile)
|
||||
@@ -171,7 +172,7 @@ if (
|
||||
const app = express()
|
||||
const httpServer = http.createServer(app)
|
||||
let httpsServer: https.Server
|
||||
if (certsLoaded) {
|
||||
if (!process.env.NS_NO_HTTPS_FORCE && certsLoaded) {
|
||||
httpsServer = https.createServer(certs, app)
|
||||
logger.Log('Listening on port: ' + httpsport + ' (https)')
|
||||
} else {
|
||||
@@ -203,7 +204,6 @@ app.use(
|
||||
cors({
|
||||
credentials: true,
|
||||
origin: true,
|
||||
// origin: [ /\.frylabs\.net$/ ]
|
||||
})
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user