From 54f422bff2e3eef9b0223bfbd3992a6302c4f584 Mon Sep 17 00:00:00 2001
From: Xiao Gui <xgui3783@gmail.com>
Date: Tue, 19 May 2020 12:12:41 +0200
Subject: [PATCH] chore: fix backend url

---
 src/util/constants.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/constants.ts b/src/util/constants.ts
index 8945936fa..021c8087b 100644
--- a/src/util/constants.ts
+++ b/src/util/constants.ts
@@ -19,7 +19,7 @@ export const BACKENDURL = BACKEND_URL && /^http/.test(BACKEND_URL)
   : (() => {
     const url = new URL(window.location.href)
     const { protocol, hostname, pathname } = url
-    return `${protocol}//${hostname}${pathname}`
+    return `${protocol}//${hostname}${pathname.replace(/\/$/, '')}/${BACKEND_URL}`
   })() || 'http://localhost:3000/'
 
 export const MIN_REQ_EXPLAINER = `
-- 
GitLab