blob: 792680dfce03388aa2ee5363d01d65720afda1d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
function handleRequest(aRequest, aResponse) {
var url = aRequest.queryString.match(/\burl=([^#&]*)/);
if (!url) {
aResponse.setStatusLine(aRequest.httpVersion, 404, "Not Found");
return;
}
url = decodeURIComponent(url[1]);
aResponse.setStatusLine(aRequest.httpVersion, 302, "Found");
aResponse.setHeader("Access-Control-Allow-Origin", "*", false);
aResponse.setHeader("Cache-Control", "no-cache", false);
aResponse.setHeader("Location", url, false);
}
|