summaryrefslogtreecommitdiffstats
path: root/toolkit/components/extensions/test/mochitest/hsts.sjs
blob: 52b9dd340b7a97ed437bb5eead718e6d6dc8b42e (plain)
1
2
3
4
5
6
7
8
9
10
"use strict";

function handleRequest(request, response) {
  let page = "<!DOCTYPE html><html><body><p>HSTS page</p></body></html>";
  response.setStatusLine(request.httpVersion, "200", "OK");
  response.setHeader("Strict-Transport-Security", "max-age=60");
  response.setHeader("Content-Type", "text/html", false);
  response.setHeader("Content-Length", page.length + "", false);
  response.write(page);
}