From c39df1c833ef4b81f7d06881507d2b07080b5650 Mon Sep 17 00:00:00 2001 From: Valentin Touffet Date: Tue, 29 Oct 2019 17:03:47 +0100 Subject: [PATCH] feat: use `proxyUrl` if provided We want to be able to configure a different path from the one mounted on Express router. For example, if we use a reverse proxy that rewrite our path we want to be able to load the UI. --- routes/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routes/index.js b/routes/index.js index 819041922..21a3c4474 100644 --- a/routes/index.js +++ b/routes/index.js @@ -1,3 +1,4 @@ module.exports = async (req, res) => { - res.render('index', { basePath: req.baseUrl }) + const basePath = req.proxyUrl || req.baseUrl + res.render('index', { basePath }) }