This commit is contained in:
Rizky 2024-07-08 13:22:27 +07:00
parent 06a45cab58
commit 23573005eb
4 changed files with 4 additions and 11 deletions

File diff suppressed because one or more lines are too long

View File

@ -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}`;
};

View File

@ -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}/`

View File

@ -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);