Skip to content

Commit c39df1c

Browse files
committed
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.
1 parent ad81d47 commit c39df1c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

routes/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
module.exports = async (req, res) => {
2-
res.render('index', { basePath: req.baseUrl })
2+
const basePath = req.proxyUrl || req.baseUrl
3+
res.render('index', { basePath })
34
}

0 commit comments

Comments
 (0)