summaryrefslogtreecommitdiff
path: root/dom/base/test/bug466080.sjs
blob: 0d7c089b700d27838abc5d02fe0aa85d519bffbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

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("Connection", "Keep-alive", false);

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