Skip to content

Commit

Permalink
update match case to avoid bugs
Browse files Browse the repository at this point in the history
Signed-off-by: cbh778899 <[email protected]>
  • Loading branch information
cbh778899 committed Aug 20, 2024
1 parent 8b2f916 commit 5b9390b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ if(isRouteEnabled("index", "docs")) {
const PORT = process.env.PORT || 8000
if(
+process.env.ENABLE_HTTPS &&
process.env.HTTPS_KEY_PATH !== "*" &&
process.env.HTTPS_CERT_PATH !== '*'
!process.env.HTTPS_KEY_PATH.startsWith("*") &&
!process.env.HTTPS_CERT_PATH.startsWith("*")
) {
const ssl_options = {
key: readFileSync(process.env.HTTPS_KEY_PATH),
cert: readFileSync(process.env.HTTPS_CERT_PATH)
}
if(process.env.HTTPS_CA_PATH && process.env.HTTPS_CA_PATH !== '*') {
if(process.env.HTTPS_CA_PATH && !process.env.HTTPS_CA_PATH.startsWith("*")) {
ssl_options.ca = readFileSync(process.env.HTTPS_CA_PATH);
}
createServer(ssl_options, app).listen(PORT, '0.0.0.0', () => {
Expand Down

0 comments on commit 5b9390b

Please sign in to comment.