From 39132d7e0ea0ee892e69c0f7e5488cce917468f3 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 2 Sep 2021 17:09:42 -0500 Subject: [PATCH] Don't use CI_PAGES_URL after all --- app/soapbox/build_config.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/app/soapbox/build_config.js b/app/soapbox/build_config.js index b0fb99cf1..f69ecf9fe 100644 --- a/app/soapbox/build_config.js +++ b/app/soapbox/build_config.js @@ -9,7 +9,6 @@ const { trimEnd } = require('lodash'); const { BACKEND_URL, FE_BASE_PATH, - CI_PAGES_URL, } = process.env; const sanitizeURL = url => { @@ -21,21 +20,8 @@ const sanitizeURL = url => { }; // Run Soapbox FE from a subdirectory. -// If FE_BASE_PATH (eg '/web') is provided, prefer it. -// For GitLab Pages builds, CI_PAGES_URL will be used. const getFeBasePath = () => { - if (FE_BASE_PATH) { - return trimEnd(FE_BASE_PATH, '/'); - } else if (CI_PAGES_URL) { - try { - const { pathname } = new URL(CI_PAGES_URL); - return trimEnd(pathname, '/'); - } catch { - return '/'; - } - } else { - return '/'; - } + return trimEnd(FE_BASE_PATH, '/') || '/'; }; // JSON.parse/stringify is to emulate what @preval is doing and avoid any