Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix: include *.langfuse.com in CSP header

Marc Klingen2b80cba1fe5a
diff --git a/web/next.config.mjs b/web/next.config.mjs
index 2d73805c7b..63abbffd10 100644
--- a/web/next.config.mjs
+++ b/web/next.config.mjs
@@ -11,8 +11,8 @@ import { env } from "./src/env.mjs";
* img-src https to allow loading images from SSO providers
*/
const cspHeader = `
- default-src 'self' https://ph.langfuse.com https://*.posthog.com https://*.sentry.io wss://*.crisp.chat https://*.crisp.chat;
- script-src 'self' 'unsafe-eval' https://*.crisp.chat https://challenges.cloudflare.com https://*.sentry.io https://ph.langfuse.com https://static.cloudflareinsights.com https://*.stripe.com;
+ default-src 'self' https://*.langfuse.com https://*.posthog.com https://*.sentry.io wss://*.crisp.chat https://*.crisp.chat;
+ script-src 'self' 'unsafe-eval' https://*.langfuse.com https://*.crisp.chat https://challenges.cloudflare.com https://*.sentry.io https://ph.langfuse.com https://static.cloudflareinsights.com https://*.stripe.com;
style-src 'self' 'unsafe-inline' https://*.crisp.chat;
img-src 'self' https: blob: data:;
font-src 'self' https://*.crisp.chat;
@@ -80,22 +80,22 @@ const nextConfig = {
// Required to check authentication status from langfuse.com
...(env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION !== undefined
? [
- {
- source: "/api/auth/session",
- headers: [
- {
- key: "Access-Control-Allow-Origin",
- value: "https://langfuse.com",
- },
- { key: "Access-Control-Allow-Credentials", value: "true" },
- { key: "Access-Control-Allow-Methods", value: "GET,POST" },
- {
- key: "Access-Control-Allow-Headers",
- value: "Content-Type, Authorization",
- },
- ],
- },
- ]
+ {
+ source: "/api/auth/session",
+ headers: [
+ {
+ key: "Access-Control-Allow-Origin",
+ value: "https://langfuse.com",
+ },
+ { key: "Access-Control-Allow-Credentials", value: "true" },
+ { key: "Access-Control-Allow-Methods", value: "GET,POST" },
+ {
+ key: "Access-Control-Allow-Headers",
+ value: "Content-Type, Authorization",
+ },
+ ],
+ },
+ ]
: []),
];
},