OLD | NEW |
---|---|
1 #!/usr/bin/perl | 1 #!/usr/bin/perl |
2 use strict; | 2 use strict; |
3 use CGI; | 3 use CGI; |
4 | 4 |
5 my $cgi = new CGI; | 5 my $cgi = new CGI; |
6 | 6 |
7 print "Content-Type: text/html; charset=UTF-8\n"; | 7 print "Content-Type: text/html; charset=UTF-8\n"; |
8 print "Content-Security-Policy: frame-ancestors " . $cgi->param("policy") . "\n\ n"; | 8 print "Content-Security-Policy: frame-ancestors " . $cgi->param("policy") . "\n" ; |
9 print "X-Frame-Options: " . $cgi->param("xfo") . "\n\n"; | |
estark
2015/09/08 18:15:47
Confusion: when $cgi->param("xfo") is empty, how d
estark
2015/09/08 18:18:20
Oh wait, duh, it will only hit the ASSERT_NOT_REAC
| |
9 | 10 |
10 print "<!DOCTYPE html>\n"; | 11 print "<!DOCTYPE html>\n"; |
11 print "<html>\n"; | 12 print "<html>\n"; |
12 print "<body>\n"; | 13 print "<body>\n"; |
13 print " <p>This is an IFrame sending a Content Security Policy header contain ing \"frame-ancestors " . $cgi->param("policy") . "\".</p>\n"; | 14 print " <p>This is an IFrame sending a Content Security Policy header contain ing \"frame-ancestors " . $cgi->param("policy") . "\" and \"X-Frame-Options: " . $cgi->param("xfo") . "\".</p>\n"; |
14 print "</body>\n"; | 15 print "</body>\n"; |
15 print "</html>\n"; | 16 print "</html>\n"; |
OLD | NEW |