file_toplevel_data_navigations.sjs (479B)
1 // Custom *.sjs file specifically for the needs of Bug: 2 // Bug 1394554 - Block toplevel data: URI navigations after redirect 3 4 var DATA_URI = 5 "data:text/html,<body>toplevel data: URI navigations after redirect should be blocked</body>"; 6 7 function handleRequest(request, response) { 8 // avoid confusing cache behaviors 9 response.setHeader("Cache-Control", "no-cache", false); 10 11 response.setStatusLine("1.1", 302, "Found"); 12 response.setHeader("Location", DATA_URI, false); 13 }