Browse Source

Allow page reload on /not-found page

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/3056/head
Joas Schilling 6 years ago
parent
commit
d62401dc48
No known key found for this signature in database GPG Key ID: 7076EA9751AACDDA
  1. 5
      appinfo/routes.php
  2. 10
      lib/Controller/PageController.php

5
appinfo/routes.php

@ -28,6 +28,11 @@ return [
'url' => '/',
'verb' => 'GET',
],
[
'name' => 'Page#notFound',
'url' => '/not-found',
'verb' => 'GET',
],
],
'ocs' => [
/**

10
lib/Controller/PageController.php

@ -134,6 +134,16 @@ class PageController extends Controller {
return $this->index($token, '', $password);
}
/**
* @PublicPage
* @NoCSRFRequired
*
* @return Response
*/
public function notFound(): Response {
return new RedirectResponse($this->url->linkToRouteAbsolute('spreed.Page.index'));
}
/**
* @PublicPage
* @NoCSRFRequired

Loading…
Cancel
Save