diff --git a/web/.env.example b/web/.env.example index e501df92b5..51631c2437 100644 --- a/web/.env.example +++ b/web/.env.example @@ -6,12 +6,10 @@ NEXT_PUBLIC_EDITION=SELF_HOSTED # different from api or web app domain. # example: http://cloud.dify.ai/console/api NEXT_PUBLIC_API_PREFIX=http://localhost:5001/console/api -NEXT_PUBLIC_WEB_PREFIX=http://localhost:3000 # The URL for Web APP, refers to the Web App base URL of WEB service if web app domain is different from # console or api domain. # example: http://udify.app/api NEXT_PUBLIC_PUBLIC_API_PREFIX=http://localhost:5001/api -NEXT_PUBLIC_PUBLIC_WEB_PREFIX=http://localhost:3000 # The API PREFIX for MARKETPLACE NEXT_PUBLIC_MARKETPLACE_API_PREFIX=https://marketplace.dify.ai/api/v1 # The URL for MARKETPLACE diff --git a/web/README.md b/web/README.md index ddb1155264..3d9fd2de87 100644 --- a/web/README.md +++ b/web/README.md @@ -31,12 +31,10 @@ NEXT_PUBLIC_EDITION=SELF_HOSTED # different from api or web app domain. # example: http://cloud.dify.ai/console/api NEXT_PUBLIC_API_PREFIX=http://localhost:5001/console/api -NEXT_PUBLIC_WEB_PREFIX=http://localhost:3000 # The URL for Web APP, refers to the Web App base URL of WEB service if web app domain is different from # console or api domain. # example: http://udify.app/api NEXT_PUBLIC_PUBLIC_API_PREFIX=http://localhost:5001/api -NEXT_PUBLIC_PUBLIC_WEB_PREFIX=http://localhost:3000 # SENTRY NEXT_PUBLIC_SENTRY_DSN= diff --git a/web/app/(commonLayout)/apps/AppCard.tsx b/web/app/(commonLayout)/apps/AppCard.tsx index c2ad1f1283..3f8c180c1a 100644 --- a/web/app/(commonLayout)/apps/AppCard.tsx +++ b/web/app/(commonLayout)/apps/AppCard.tsx @@ -16,7 +16,7 @@ import AppsContext, { useAppContext } from '@/context/app-context' import type { HtmlContentProps } from '@/app/components/base/popover' import CustomPopover from '@/app/components/base/popover' import Divider from '@/app/components/base/divider' -import { WEB_PREFIX } from '@/config' +import { basePath } from '@/utils/var' import { getRedirection } from '@/utils/app-redirection' import { useProviderContext } from '@/context/provider-context' import { NEED_REFRESH_APP_LIST_KEY } from '@/config' @@ -217,7 +217,7 @@ const AppCard = ({ app, onRefresh }: AppCardProps) => { try { const { installed_apps }: any = await fetchInstalledAppList(app.id) || {} if (installed_apps?.length > 0) - window.open(`${WEB_PREFIX}/explore/installed/${installed_apps[0].id}`, '_blank') + window.open(`${basePath}/explore/installed/${installed_apps[0].id}`, '_blank') else throw new Error('No app found in Explore') } diff --git a/web/app/(commonLayout)/datasets/NewDatasetCard.tsx b/web/app/(commonLayout)/datasets/NewDatasetCard.tsx index ddc48c2a6e..792d9904da 100644 --- a/web/app/(commonLayout)/datasets/NewDatasetCard.tsx +++ b/web/app/(commonLayout)/datasets/NewDatasetCard.tsx @@ -1,6 +1,6 @@ 'use client' import { useTranslation } from 'react-i18next' -import Link from 'next/link' +import { basePath } from '@/utils/var' import { RiAddLine, RiArrowRightLine, @@ -18,7 +18,7 @@ const CreateAppCard = (