From d8a44a8d7be1c3f3f35bd0200d3c3035082fe6c1 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Wed, 18 Dec 2024 18:49:06 +0100 Subject: [PATCH] fix: set a header that tells caches not to store the responses in a cache --- src/api.php | 1 + src/collect.php | 1 + 2 files changed, 2 insertions(+) diff --git a/src/api.php b/src/api.php index 7ea8e09..54f2a6f 100644 --- a/src/api.php +++ b/src/api.php @@ -6,6 +6,7 @@ $mysqlDriver = new mysqli_driver(); $mysqlDriver->report_mode = MYSQLI_REPORT_OFF; header("Content-Type: application/json"); +header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate"); if (!isset($_GET["scope"])) { http_response_code(400); diff --git a/src/collect.php b/src/collect.php index c269db7..48190de 100644 --- a/src/collect.php +++ b/src/collect.php @@ -6,6 +6,7 @@ $mysqlDriver = new mysqli_driver(); $mysqlDriver->report_mode = MYSQLI_REPORT_OFF; header("Content-Type: application/json"); +header("Cache-Control: no-cache"); if ($_SERVER["REQUEST_METHOD"] == "POST") { if (