Skip to content

Commit

Permalink
Do not cache 404 [getgrav#3025]
Browse files Browse the repository at this point in the history
  • Loading branch information
mahagr committed Oct 5, 2020
1 parent 18921a4 commit 23716ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions system/pages/notfound.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
title: Not Found
routable: false
notfound: true
expires: 0
---
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Grav.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public function process()
);

$default = function (ServerRequestInterface $request) {
return new Response(404);
return new Response(404, ['Expires' => 0, 'Cache-Control' => 'no-cache, no-store, must-revalidate'], 'Not Found');
};

/** @var Debugger $debugger */
Expand Down

0 comments on commit 23716ff

Please sign in to comment.