mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-16 17:25:56 +08:00
chore: use gloabe
This commit is contained in:
parent
31825a8cd2
commit
0582a3e9b6
@ -27,9 +27,9 @@ else if (
|
|||||||
) {
|
) {
|
||||||
// Not build can not get env from process.env.NEXT_PUBLIC_ in browser https://nextjs.org/docs/basic-features/environment-variables#exposing-environment-variables-to-the-browser
|
// Not build can not get env from process.env.NEXT_PUBLIC_ in browser https://nextjs.org/docs/basic-features/environment-variables#exposing-environment-variables-to-the-browser
|
||||||
apiPrefix = globalThis.document.body.getAttribute('data-api-prefix') as string
|
apiPrefix = globalThis.document.body.getAttribute('data-api-prefix') as string
|
||||||
webPrefix = (globalThis.document.body.getAttribute('data-web-prefix') as string || location.origin)
|
webPrefix = (globalThis.document.body.getAttribute('data-web-prefix') as string || globalThis.location.origin)
|
||||||
publicApiPrefix = globalThis.document.body.getAttribute('data-pubic-api-prefix') as string
|
publicApiPrefix = globalThis.document.body.getAttribute('data-pubic-api-prefix') as string
|
||||||
publicWebPrefix = (globalThis.document.body.getAttribute('data-pubic-web-prefix') as string || location.origin)
|
publicWebPrefix = (globalThis.document.body.getAttribute('data-pubic-web-prefix') as string || globalThis.location.origin)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// const domainParts = globalThis.location?.host?.split('.');
|
// const domainParts = globalThis.location?.host?.split('.');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user