moebius#223: Consider blocking top level window data: URIs (part 1/3 without tests)

https://github.com/MoonchildProductions/moebius/pull/223
This commit is contained in:
janekptacijarabaci 2018-04-22 18:51:38 +02:00 committed by Roy Tam
commit 712d19e1b7
22 changed files with 515 additions and 1 deletions

View file

@ -0,0 +1,14 @@
// Custom *.sjs file specifically for the needs of Bug:
// Bug 1394554 - Block toplevel data: URI navigations after redirect
var DATA_URI =
"data:text/html,<body>toplevel data: URI navigations after redirect should be blocked</body>";
function handleRequest(request, response)
{
// avoid confusing cache behaviors
response.setHeader("Cache-Control", "no-cache", false);
response.setStatusLine("1.1", 302, "Found");
response.setHeader("Location", DATA_URI, false);
}