♻️ refactor(middleware): remove duplicate CSP header assignment

- Removed redundant `Content-Security-Policy` header set 🧹
- Improved code clarity and avoided unnecessary operations 

#refactor #middleware #security
pull/20548/head
Muttakin Islam Hasib 12 months ago committed by GitHub
parent b33f8b47ca
commit ccb6a154c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -56,11 +56,6 @@ export function middleware(request: NextRequest) {
contentSecurityPolicyHeaderValue,
)
response.headers.set(
'Content-Security-Policy',
contentSecurityPolicyHeaderValue,
)
return wrapResponseWithXFrameOptions(response, pathname)
}

Loading…
Cancel
Save