Disable response caching in CoreRewriteTestAction
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 25 Aug 2023 08:08:33 +0000 (10:08 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 25 Aug 2023 08:22:51 +0000 (10:22 +0200)
wcfsetup/install/files/lib/action/CoreRewriteTestAction.class.php

index 0121869ba14beecf470bf1c3cf541fb29f8e6d20..cabcd15279a4c0dcc69a5453f287da091e21897f 100644 (file)
@@ -3,6 +3,7 @@
 namespace wcf\action;
 
 use Laminas\Diactoros\Response\JsonResponse;
+use wcf\util\HeaderUtil;
 
 /**
  * Internal action used to run a test for url rewriting.
@@ -23,11 +24,11 @@ final class CoreRewriteTestAction extends AbstractAction
     {
         parent::execute();
 
-        return new JsonResponse(
+        return HeaderUtil::withNoCacheHeaders(new JsonResponse(
             [
                 'core_rewrite_test' => 'passed',
             ],
             200,
-        );
+        ));
     }
 }