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.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
import Negotiator from 'negotiator'
import { APP_UNAVAILABLE_PATH } from './document-constants'
import { getBrowserLocale } from './locale'
/** The proxy-owned error route skips application bootstrap and uses the visitor locale. */
export function getAppAccessErrorDocument(requestHeaders: Pick<Headers, 'get'>) {
if (requestHeaders.get('x-dify-pathname') !== APP_UNAVAILABLE_PATH) return undefined
return {
locale: getBrowserLocale(
new Negotiator({
headers: { 'accept-language': requestHeaders.get('accept-language') ?? '' },
}).languages(),
),
}
}