From 7c04dc00b18fdf647b611e6b3230e85c9d2e7ebd Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Tue, 3 Sep 2024 13:46:43 +0200 Subject: [PATCH] fix --- .gitignore | 2 +- packages/web/src/utility/resolveApi.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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() {