From 23c8c7f9245d54c57db04beeccb1d33934c9f7f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Mon, 30 Jan 2023 10:54:14 +0100 Subject: [PATCH] frontend: use /api subpath instead of subdomain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because buying certificates with multiple SANs every time you want to deploy an envrionment is a pain the ass and expensive. Signed-off-by: Jakub SokoĊ‚owski --- spiffworkflow-frontend/src/config.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spiffworkflow-frontend/src/config.tsx b/spiffworkflow-frontend/src/config.tsx index 36e0ed4e..9813b943 100644 --- a/spiffworkflow-frontend/src/config.tsx +++ b/spiffworkflow-frontend/src/config.tsx @@ -1,5 +1,5 @@ const { port, hostname } = window.location; -let hostAndPort = `api.${hostname}`; +let hostAndPort = hostname; let protocol = 'https'; if (/^\d+\./.test(hostname) || hostname === 'localhost') { @@ -11,7 +11,7 @@ if (/^\d+\./.test(hostname) || hostname === 'localhost') { protocol = 'http'; } -let url = `${protocol}://${hostAndPort}/v1.0`; +let url = `${protocol}://${hostAndPort}/api/v1.0`; if (process.env.REACT_APP_BACKEND_BASE_URL) { url = process.env.REACT_APP_BACKEND_BASE_URL; }