try disable csp

This commit is contained in:
Stephen Zhou 2026-04-08 19:06:15 +08:00
parent 5b3616aa33
commit abcf4a5730
No known key found for this signature in database

View File

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