summaryrefslogtreecommitdiffstats
path: root/netwerk/test/mochitests/rel_preconnect.sjs
blob: 5423c877f067d9c89f5aa9fa1316e7af1b9bb41f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Generate response header "Link: <HREF>; rel=preconnect"
// HREF is provided by the request header X-Link

function handleRequest(request, response) {
  response.setHeader("Cache-Control", "no-cache", false);
  response.setHeader(
    "Link",
    "<" +
      request.queryString +
      ">; rel=preconnect" +
      ", " +
      "<" +
      request.queryString +
      ">; rel=preconnect; crossOrigin=anonymous"
  );
  response.write("check that header");
}