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:
parent
c27d72bf40
commit
2fc64811e2
1 changed files with 2 additions and 2 deletions
|
@ -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$/ ]
|
||||
})
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue