1 /* Any copyright is dedicated to the Public Domain.
2 * http://creativecommons.org/publicdomain/zero/1.0/ */
5 function handleRequest(request, response) {
6 let hstsHeader = "max-age=300";
7 if (request.queryString == "includeSubdomains") {
8 hstsHeader += "; includeSubdomains";
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>");