Return 404 when attempting to access /error directly in production

Replaces #2212
This commit is contained in:
Luke Towers 2019-04-19 15:29:00 -06:00
parent 07aa790fc0
commit 7c7ff31cd6
1 changed files with 1 additions and 1 deletions

View File

@ -203,7 +203,7 @@ class Controller
/*
* If the page was not found, render the 404 page - either provided by the theme or the built-in one.
*/
if (!$page || $url === '404') {
if (!$page || $url === '404' || ($url === 'error' && !Config::get('app.debug', false))) {
if (!Request::ajax()) {
$this->setStatusCode(404);
}