Skip to content

Commit

Permalink
Set no-cache headers for health check endpoint
Browse files Browse the repository at this point in the history
Resolves #16364
  • Loading branch information
jamesmacwhite authored and brandonkelly committed Dec 30, 2024
1 parent 7e340bd commit ae59346
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-WIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
## System
- Database rows with foreign keys referencing nonexistent rows are now deleted via garbage collection.
- Pages which contain image transform generation URLs now set no-cache headers. ([#16195](https://github.com/craftcms/cms/discussions/16195))
- The `app/health-check` action now sends no-cache headers. ([#16364](https://github.com/craftcms/cms/pull/16364))
- Updated Twig to 3.15. ([#16207](https://github.com/craftcms/cms/discussions/16207))
1 change: 1 addition & 0 deletions src/controllers/AppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public function beforeAction($action): bool
public function actionHealthCheck(): Response
{
// All that matters is the 200 response
$this->response->setNoCacheHeaders();
$this->response->format = Response::FORMAT_RAW;
$this->response->data = '';
return $this->response;
Expand Down

0 comments on commit ae59346

Please sign in to comment.