1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-03 21:10:05 +00:00

feat(env): added new env variable LOG_FORMAT_MORGAN

This commit is contained in:
Saad Jutt
2022-05-23 21:14:37 +05:00
parent f37f8e95d1
commit 53bf68a6af
4 changed files with 52 additions and 8 deletions

View File

@@ -37,10 +37,18 @@ if (verifyEnvVariables()) {
const app = express()
app.use(cookieParser())
app.use(morgan('tiny'))
const { MODE, CORS, WHITELIST, PROTOCOL, HELMET_CSP_CONFIG_PATH, HELMET_COEP } =
process.env
const {
MODE,
CORS,
WHITELIST,
PROTOCOL,
HELMET_CSP_CONFIG_PATH,
HELMET_COEP,
LOG_FORMAT_MORGAN
} = process.env
app.use(morgan(LOG_FORMAT_MORGAN as string))
export const cookieOptions = {
secure: PROTOCOL === ProtocolType.HTTPS,