|
@@ -23,8 +23,10 @@ else {
|
|
|
// const domainParts = globalThis.location?.host?.split('.');
|
|
|
// in production env, the host is dify.app . In other env, the host is [dev].dify.app
|
|
|
// const env = domainParts.length === 2 ? 'ai' : domainParts?.[0];
|
|
|
- apiPrefix = '/dify-api/console/api'
|
|
|
- publicApiPrefix = '/dify-api/api' // avoid browser private mode api cross origin
|
|
|
+ // apiPrefix = '/dify-api/console/api'
|
|
|
+ // publicApiPrefix = '/dify-api/api' // avoid browser private mode api cross origin
|
|
|
+ apiPrefix = (import.meta as any).env.VITE_DIFY_API_PREFIX
|
|
|
+ publicApiPrefix = (import.meta as any).env.VITE_DIFY_PUBLIC_API_PREFIX // avoid browser private mode api cross origin
|
|
|
}
|
|
|
|
|
|
export const API_PREFIX: string = apiPrefix
|