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.

chore: allow configurable Next.js dev origins (#35683)

非法操作f1d72eb5d2c5
diff --git a/web/next.config.ts b/web/next.config.ts
index db44f5b9ede..a1c2e410a14 100644
--- a/web/next.config.ts
+++ b/web/next.config.ts
@@ -5,9 +5,13 @@ import { env } from './env'
const isDev = process.env.NODE_ENV === 'development'
const withMDX = createMDX()
+const allowedDevOrigins = process.env.NEXT_ALLOWED_DEV_ORIGINS?.split(',')
+ .map(origin => origin.trim())
+ .filter(Boolean)
const nextConfig: NextConfig = {
basePath: env.NEXT_PUBLIC_BASE_PATH,
+ ...(allowedDevOrigins?.length ? { allowedDevOrigins } : {}),
transpilePackages: ['@t3-oss/env-core', '@t3-oss/env-nextjs', 'echarts', 'zrender'],
turbopack: {
rules: codeInspectorPlugin({