Skip to content

Commit 7c6eb9a

Browse files
committed
prevent proies from caching walls
1 parent a5b2a2b commit 7c6eb9a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

inc/Bounce.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,15 @@ public function sendResponse(?string $body, int $statusCode = 200): void
290290
break;
291291
case 401:
292292
header('HTTP/1.0 401 Unauthorized');
293+
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
294+
header('Cache-Control: post-check=0, pre-check=0', false);
295+
header('Pragma: no-cache');
293296
break;
294297
case 403:
295298
header('HTTP/1.0 403 Forbidden');
299+
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
300+
header('Cache-Control: post-check=0, pre-check=0', false);
301+
header('Pragma: no-cache');
296302
break;
297303
default:
298304
throw new Exception("Unhandled code ${statusCode}");

0 commit comments

Comments
 (0)