env: rename ENABLE_CORS to CORS_WILDCARD for better clarity

This commit is contained in:
wukko
2024-03-05 19:20:56 +06:00
parent 765615390a
commit 011a0127b4
3 changed files with 4 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ import { sha256 } from "../modules/sub/crypto.js";
import { verifyStream } from "../modules/stream/manage.js";
export function runAPI(express, app, gitCommit, gitBranch, __dirname) {
const corsConfig = process.env.ENABLE_CORS === '0' ? {
const corsConfig = process.env.CORS_WILDCARD === '0' ? {
origin: process.env.CORS_URL,
optionsSuccessStatus: 200
} : {};
@@ -143,7 +143,7 @@ export function runAPI(express, app, gitCommit, gitBranch, __dirname) {
branch: gitBranch,
name: process.env.API_NAME || "unknown",
url: process.env.API_URL,
cors: process.env?.ENABLE_CORS === "0" ? 0 : 1,
cors_wildcard: process.env?.CORS_WILDCARD === "0" ? 0 : 1,
startTime: `${startTimestamp}`
});
default:

View File

@@ -59,7 +59,7 @@ function setup() {
rl.question(q, apiCors => {
let answCors = apiCors.toLowerCase().trim();
if (answCors !== "y" && answCors !== "yes") ob['ENABLE_CORS'] = '0'
if (answCors !== "y" && answCors !== "yes") ob['CORS_WILDCARD'] = '0'
final()
})
})