From faebb87bf7be5b3c246adaf45b378a7a4a3380a7 Mon Sep 17 00:00:00 2001 From: tariqksoliman Date: Tue, 29 Oct 2024 18:12:45 -0700 Subject: [PATCH] #581 Fix proxy pathing again --- adjacent-servers/adjacent-servers-proxy.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/adjacent-servers/adjacent-servers-proxy.js b/adjacent-servers/adjacent-servers-proxy.js index 008d2a9c..cb0a9e26 100644 --- a/adjacent-servers/adjacent-servers-proxy.js +++ b/adjacent-servers/adjacent-servers-proxy.js @@ -101,17 +101,17 @@ const createSwaggerInterceptor = (path) => { return response .replace( "'/api'", - `window.location.pathname.replace('/${path}/api.html', '${ + `'${ (process.env.EXTERNAL_ROOT_PATH || "") + (process.env.ROOT_PATH || "") - }/${path}/api')` + }/${path}/api'` ) .replace( "'/docs/oauth2-redirect'", - `window.location.pathname.replace('/${path}/api.html', '${ + `'${ (process.env.EXTERNAL_ROOT_PATH || "") + (process.env.ROOT_PATH || "") - }/${path}/docs/oauth2-redirect')` + }/${path}/docs/oauth2-redirect'` ); // manipulate response and return the result } return responseBuffer;