mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 08:35:26 +00:00
18 lines
495 B
Plaintext
18 lines
495 B
Plaintext
|
|
||
|
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);
|
||
|
}
|