refactor: centralize envs and their defaults in modules/config (#464)
* feat(config): centralized env variables and their default values * fix: fip `corsWildcard` variable check in `corsConfig` * fix(config): use already declared variables and default some strings to undefined * fix: check processingPriority against NaN
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import Cookie from './cookie.js';
|
||||
import { readFile, writeFile } from 'fs/promises';
|
||||
import { parse as parseSetCookie, splitCookiesString } from 'set-cookie-parser';
|
||||
import { env } from '../../../modules/config.js'
|
||||
|
||||
const WRITE_INTERVAL = 60000,
|
||||
cookiePath = process.env.COOKIE_PATH,
|
||||
cookiePath = env.cookiePath,
|
||||
COUNTER = Symbol('counter');
|
||||
|
||||
let cookies = {}, dirty = false, intervalId;
|
||||
|
||||
Reference in New Issue
Block a user