diff --git a/.gitignore b/.gitignore index 5ba6aaa4..4fbefcaf 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,4 @@ packages/api/src/nativeModulesContent.js packages/api/src/packagedPluginsContent.js .VSCodeCounter -pacgaes/web/public/*.html \ No newline at end of file +packages/web/public/*.html \ No newline at end of file diff --git a/packages/web/src/utility/resolveApi.ts b/packages/web/src/utility/resolveApi.ts index 09180607..454b8a19 100644 --- a/packages/web/src/utility/resolveApi.ts +++ b/packages/web/src/utility/resolveApi.ts @@ -10,7 +10,7 @@ export default function resolveApi() { if (apiUrl) { return apiUrl; } - return (window.location.origin + window.location.pathname).replace(/\/*$/, ''); + return (window.location.origin + window.location.pathname).replace(/\/[a-zA-Z-]+\.html$/, '').replace(/\/*$/, ''); } export function resolveApiHeaders() {