Detect base path for installer

pull/9/head
Toby Zerner 2015-08-17 14:32:14 +09:30
parent 05c4237533
commit a1d76f4873
1 changed files with 3 additions and 1 deletions

View File

@ -28,7 +28,9 @@ if ($app->bound('flarum.config')) {
$app->register('Flarum\Install\InstallServiceProvider');
$flarum = new MiddlewarePipe();
$flarum->pipe('/', $app->make('Flarum\Http\RouterMiddleware', ['routes' => $app->make('flarum.install.routes')]));
$basePath = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$flarum->pipe($basePath, $app->make('Flarum\Http\RouterMiddleware', ['routes' => $app->make('flarum.install.routes')]));
$flarum->pipe(new \Franzl\Middleware\Whoops\Middleware());
}