fix: Enable crash journal only in production mode (no-changelog) (#4948)
* consolidate various `NODE_ENV` checks in the `cli` package * enable crash journal only in production
This commit is contained in:
committed by
GitHub
parent
2a7cb0192a
commit
323bd78067
@@ -1,8 +1,6 @@
|
||||
import { inDevelopment } from '@/constants';
|
||||
import type { RequestHandler } from 'express';
|
||||
|
||||
const { NODE_ENV } = process.env;
|
||||
const inDevelopment = !NODE_ENV || NODE_ENV === 'development';
|
||||
|
||||
export const corsMiddleware: RequestHandler = (req, res, next) => {
|
||||
if (inDevelopment && 'origin' in req.headers) {
|
||||
// Allow access also from frontend when developing
|
||||
|
||||
Reference in New Issue
Block a user