mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
fix: create config should allow all options params
This commit is contained in:
parent
4e6dcaf3fd
commit
14a7d1b3b2
@ -223,6 +223,12 @@ export function createConfig(options: IUnleashOptions): IUnleashConfig {
|
|||||||
listen = { host: server.host || undefined, port: server.port };
|
listen = { host: server.host || undefined, port: server.port };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const secureHeaders =
|
||||||
|
options.secureHeaders || safeBoolean(process.env.SECURE_HEADERS, false);
|
||||||
|
|
||||||
|
const enableOAS =
|
||||||
|
options.enableOAS || safeBoolean(process.env.ENABLE_OAS, false);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
db,
|
db,
|
||||||
session,
|
session,
|
||||||
@ -235,8 +241,8 @@ export function createConfig(options: IUnleashOptions): IUnleashConfig {
|
|||||||
import: importSetting,
|
import: importSetting,
|
||||||
experimental: experimental || {},
|
experimental: experimental || {},
|
||||||
email,
|
email,
|
||||||
secureHeaders: safeBoolean(process.env.SECURE_HEADERS, false),
|
secureHeaders,
|
||||||
enableOAS: safeBoolean(process.env.ENABLE_OAS, false),
|
enableOAS,
|
||||||
preHook: options.preHook,
|
preHook: options.preHook,
|
||||||
preRouterHook: options.preRouterHook,
|
preRouterHook: options.preRouterHook,
|
||||||
eventHook: options.eventHook,
|
eventHook: options.eventHook,
|
||||||
|
Loading…
Reference in New Issue
Block a user