summaryrefslogtreecommitdiffstats
path: root/toolkit/components/antitracking/test/browser/cookiesCORS.sjs
blob: 2cfdca2700abf55017e282a8e04bb2f33dd8ab9a (plain)
1
2
3
4
5
6
7
8
9
function handleRequest(aRequest, aResponse) {
  aResponse.setStatusLine(aRequest.httpVersion, 200);
  aResponse.setHeader("Access-Control-Allow-Origin", "http://example.net");
  aResponse.setHeader("Access-Control-Allow-Credentials", "true");

  if (aRequest.queryString) {
    aResponse.setHeader("Set-Cookie", "foopy=" + aRequest.queryString);
  }
}