From c1b0893072ca77a3e794783a30cf8592472dcdd3 Mon Sep 17 00:00:00 2001 From: bepsvpt <8221099+bepsvpt@users.noreply.github.com> Date: Sun, 13 Oct 2024 17:13:24 +0800 Subject: [PATCH] fix: missing clientHints handler for Clear-Site-Data header --- src/Builders/ClearSiteDataBuilder.php | 1 + tests/Builders/ClearSiteDataBuilderTest.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Builders/ClearSiteDataBuilder.php b/src/Builders/ClearSiteDataBuilder.php index 777bb3a..dc67a17 100644 --- a/src/Builders/ClearSiteDataBuilder.php +++ b/src/Builders/ClearSiteDataBuilder.php @@ -11,6 +11,7 @@ final class ClearSiteDataBuilder extends Builder */ protected $whitelist = [ 'cache' => true, + 'clientHints' => true, 'cookies' => true, 'storage' => true, 'executionContexts' => true, diff --git a/tests/Builders/ClearSiteDataBuilderTest.php b/tests/Builders/ClearSiteDataBuilderTest.php index d0e46d8..fb36960 100644 --- a/tests/Builders/ClearSiteDataBuilderTest.php +++ b/tests/Builders/ClearSiteDataBuilderTest.php @@ -37,11 +37,13 @@ public function testClearSiteData() ); $config = [ + 'clientHints' => true, + 'executionContexts' => true, ]; $this->assertSame( - '"executionContexts"', + '"clientHints", "executionContexts"', (new ClearSiteDataBuilder($config))->get() ); }