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:
@@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user