1
0
mirror of https://github.com/flarum/core.git synced 2025-08-08 17:36:38 +02:00

Support running in subdirectory with base_path config

This commit is contained in:
Toby Zerner
2015-08-13 12:58:59 +09:30
parent aec83b295a
commit 9c7fab5d8c
5 changed files with 13 additions and 5 deletions

View File

@@ -45,8 +45,13 @@ export default function boot(app) {
app.modal = m.mount(document.getElementById('modal'), ModalManager.component());
app.alerts = m.mount(document.getElementById('alerts'), AlertManager.component());
const basePath = app.forum.attribute('basePath');
m.route.mode = 'pathname';
m.route(document.getElementById('content'), '/', mapRoutes(app.routes));
m.route(
document.getElementById('content'),
basePath + '/',
mapRoutes(app.routes, basePath)
);
m.endComputation();