summaryrefslogtreecommitdiffstats
path: root/dom/base/test/bug466080.sjs
blob: df3687000b12626fc93da66be5ca97f9f3c5e13e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function handleRequest(request, response) {
  var body = "loaded";
  var origin = "localhost";
  try {
    var origin = request.getHeader("Origin");
  } catch (e) {}

  response.setHeader("Access-Control-Allow-Origin", origin, false);
  response.setHeader("Access-Control-Allow-Credentials", "true", false);
  response.setHeader("Access-Control-Allow-Methods", "XMETHOD", false);
  response.setHeader("Connection", "Keep-alive", false);

  response.bodyOutputStream.write(body, body.length);
}