@@ -186,7 +186,6 @@ public function testGetHttpHeaders(
186186 string $ privateKey ,
187187 string $ publicKey ,
188188 string $ captchaCsp ,
189- string |null $ expectedFrameOptions ,
190189 string $ expectedCsp ,
191190 ): void {
192191 $ header = $ this ->getNewHeaderInstance ();
@@ -206,21 +205,17 @@ public function testGetHttpHeaders(
206205 'X-Permitted-Cross-Domain-Policies ' => 'none ' ,
207206 'X-Robots-Tag ' => 'noindex, nofollow ' ,
208207 'Permissions-Policy ' => 'fullscreen=(self), interest-cohort=() ' ,
209- 'X-Frame-Options ' => $ expectedFrameOptions ?? '' ,
210208 'Expires ' => 'Wed, 21 Oct 2015 07:28:00 GMT ' ,
211209 'Cache-Control ' => 'no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0 ' ,
212210 'Pragma ' => 'no-cache ' ,
213211 'Last-Modified ' => 'Wed, 21 Oct 2015 07:28:00 GMT ' ,
214212 'Content-Type ' => 'text/html; charset=utf-8 ' ,
215213 ];
216- if ($ expectedFrameOptions === null ) {
217- unset($ expected ['X-Frame-Options ' ]);
218- }
219214
220215 self ::assertSame ($ expected , $ header ->getHttpHeaders (MockClock::from ('2015-10-21T05:28:00-02:00 ' )));
221216 }
222217
223- /** @psalm-return list<array{string|bool, string, string, string, string, string |null, string}> */
218+ /** @psalm-return list<array{string|bool, string, string, string, string|null, string}> */
224219 public static function providerForTestGetHttpHeaders (): array
225220 {
226221 return [
@@ -230,33 +225,32 @@ public static function providerForTestGetHttpHeaders(): array
230225 '' ,
231226 '' ,
232227 '' ,
233- 'DENY ' ,
234228 "default-src 'self'; "
235229 . " img-src 'self' data: tile.openstreetmap.org; "
236230 . " object-src 'none'; "
237231 . " script-src 'self' 'unsafe-inline' 'unsafe-eval'; "
238232 . " style-src 'self' 'unsafe-inline'; "
233+ . " frame-ancestors 'none'; " ,
239234 ],
240235 [
241236 'sameorigin ' ,
242237 'example.com example.net ' ,
243238 'PrivateKey ' ,
244239 'PublicKey ' ,
245240 'captcha.tld csp.tld ' ,
246- 'SAMEORIGIN ' ,
247241 "default-src 'self' captcha.tld csp.tld example.com example.net; "
248242 . " img-src 'self' data: captcha.tld csp.tld example.com example.net tile.openstreetmap.org; "
249243 . " object-src 'none'; "
250244 . " script-src 'self' 'unsafe-inline' 'unsafe-eval' captcha.tld csp.tld example.com example.net; "
251245 . " style-src 'self' 'unsafe-inline' captcha.tld csp.tld example.com example.net; "
246+ . " frame-ancestors 'self'; " ,
252247 ],
253248 [
254249 true ,
255250 '' ,
256251 'PrivateKey ' ,
257252 'PublicKey ' ,
258253 'captcha.tld csp.tld ' ,
259- null ,
260254 "default-src 'self' captcha.tld csp.tld; "
261255 . " img-src 'self' data: captcha.tld csp.tld tile.openstreetmap.org; "
262256 . " object-src 'none'; "
0 commit comments