chore: fix load env and treeshaking for vinext (#32928)

This commit is contained in:
Stephen Zhou
2026-03-04 10:07:29 +08:00
committed by GitHub
parent 1c1edb4a22
commit 3bf7bb1781
7 changed files with 17 additions and 25 deletions

View File

@@ -22,7 +22,7 @@ export function proxy(request: NextRequest) {
},
})
const isWhiteListEnabled = !!env.NEXT_PUBLIC_CSP_WHITELIST && env.NODE_ENV === 'production'
const isWhiteListEnabled = !!env.NEXT_PUBLIC_CSP_WHITELIST && process.env.NODE_ENV === 'production'
if (!isWhiteListEnabled)
return wrapResponseWithXFrameOptions(response, pathname)