summaryrefslogtreecommitdiffstats
path: root/netwerk/test/mochitests/rel_preconnect.sjs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--netwerk/test/mochitests/rel_preconnect.sjs17
1 files changed, 17 insertions, 0 deletions
diff --git a/netwerk/test/mochitests/rel_preconnect.sjs b/netwerk/test/mochitests/rel_preconnect.sjs
new file mode 100644
index 0000000000..5423c877f0
--- /dev/null
+++ b/netwerk/test/mochitests/rel_preconnect.sjs
@@ -0,0 +1,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");
+}