Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

Revert "♻️ refactor(middleware): remove duplicate CSP header assignment" (#20592)

crazywoola25be7c1ad50c
diff --git a/web/middleware.ts b/web/middleware.ts
index 33bdb974819..3fee535ea4e 100644
--- a/web/middleware.ts
+++ b/web/middleware.ts
@@ -56,6 +56,11 @@ export function middleware(request: NextRequest) {
contentSecurityPolicyHeaderValue,
)
+ response.headers.set(
+ 'Content-Security-Policy',
+ contentSecurityPolicyHeaderValue,
+ )
+
return wrapResponseWithXFrameOptions(response, pathname)
}