fix: basepath did not read from the environment variable (#24870)

This commit is contained in:
17hz 2025-09-01 13:50:33 +08:00 • committed by GitHub
commit f11131f8b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 10 deletions

View file

@ -1,6 +0,0 @@
// export basePath to next.config.js
// same as the one exported from var.ts
module.exports = {
basePath: process.env.NEXT_PUBLIC_BASE_PATH || '',
assetPrefix: '',
}

View file

@ -118,7 +118,7 @@ export const getVars = (value: string) => {
// Set the value of basePath
// example: /dify
export const basePath = ''
export const basePath = process.env.NEXT_PUBLIC_BASE_PATH || ''
export function getMarketplaceUrl(path: string, params?: Record<string, string | undefined>) {
const searchParams = new URLSearchParams({ source: encodeURIComponent(window.location.origin) })