fix
This commit is contained in:
parent
06a45cab58
commit
23573005eb
File diff suppressed because one or more lines are too long
|
|
@ -62,13 +62,6 @@ export const loadApiProxyDef = async (_url: string, with_types: boolean) => {
|
|||
const baseUrl = (url: string) => {
|
||||
const base = new URL(url);
|
||||
|
||||
// if (!["prasi.avolut.com", "localhost"].includes(base.hostname)) {
|
||||
// const cur = new URL(location.href);
|
||||
// if (!["prasi.avolut.com", "localhost"].includes(cur.hostname)) {
|
||||
// base.hostname = cur.hostname;
|
||||
// }
|
||||
// }
|
||||
|
||||
return `${base.protocol}//${base.host}`;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ const injectSiteScript = () => {
|
|||
|
||||
const cur = new URL(location.href);
|
||||
cur.pathname = "";
|
||||
if (!["prasi.avolut.com", "localhost"].includes(cur.hostname)) {
|
||||
if (!["prasi.avolut.com"].includes(cur.hostname)) {
|
||||
const cur_url = cur.toString();
|
||||
script.src = `${
|
||||
cur_url.endsWith("/") ? cur_url : `${cur_url}/`
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ export const Vi: FC<{
|
|||
return pathname;
|
||||
|
||||
try {
|
||||
if (["prasi.avolut.com", "localhost"].includes(location.hostname)) {
|
||||
if (["prasi.avolut.com"].includes(location.hostname)) {
|
||||
if (vi.site.api_url) {
|
||||
if (!vi.site_url) {
|
||||
vi.site_url = new URL(vi.site.api_url);
|
||||
|
|
|
|||
Loading…
Reference in New Issue