summaryrefslogtreecommitdiffstats
path: root/dom/security/test/csp/file_blocked_uri_redirect_frame_src_server.sjs
blob: 5e5dbdafdf4541f25f9d0e40009a7bf41bffa987 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Redirect server specifically for the needs of Bug 1687342

function handleRequest(request, response) {
  response.setHeader("Cache-Control", "no-cache", false);

  let query = request.queryString;
  if (query === "doredirect") {
    var newLocation =
      "http://test1.example.com/tests/dom/security/test/csp/file_blocked_uri_redirect_frame_src_server.sjs?query#ref2";
    response.setStatusLine("1.1", 302, "Found");
    response.setHeader("Location", newLocation, false);
    return;
  }
}