Bug 1938475 [Wayland] Fallback to monitor screen scale if we're missing wayland surfa...
[gecko.git] / security / manager / ssl / tests / mochitest / browser / hsts_headers.sjs
blob95eede25f025cd01292a998520b0da3116b46ae3
1 /* Any copyright is dedicated to the Public Domain.
2  * http://creativecommons.org/publicdomain/zero/1.0/ */
3 "use strict";
5 function handleRequest(request, response) {
6   let hstsHeader = "max-age=300";
7   if (request.queryString == "includeSubdomains") {
8     hstsHeader += "; includeSubdomains";
9   }
10   response.setHeader("Strict-Transport-Security", hstsHeader);
11   response.setHeader("Pragma", "no-cache");
12   response.setHeader("Cache-Control", "no-cache", false);
13   response.setHeader("Content-Type", "text/html", false);
14   response.setStatusLine(request.httpVersion, 200);
15   response.write("<!DOCTYPE html><html><body><h1>Ok!</h1></body></html>");