Fix redirect from / in api

This commit is contained in:
rijkvanzanten
2020-10-30 19:04:31 -04:00
parent e3a60b4bfa
commit 9a38fdea5e

View File

@@ -88,7 +88,7 @@ export default async function createApp() {
html = html.replace(/href="\//g, `href="${env.PUBLIC_URL}`);
html = html.replace(/src="\//g, `src="${env.PUBLIC_URL}`);
app.get('/', (req, res) => res.redirect(`${env.PUBLIC_URL}/admin/`));
app.get('/', (req, res) => res.redirect(`${env.PUBLIC_URL}admin/`));
app.get('/admin', (req, res) => res.send(html));
app.use('/admin', express.static(path.join(adminPath, '..')));
app.use('/admin/*', (req, res) => {