allowMedia.sjs 411 B

12345678910111213
  1. /* Any copyright is dedicated to the Public Domain.
  2. * http://creativecommons.org/publicdomain/zero/1.0/ */
  3. function handleRequest(req, resp) {
  4. resp.setHeader("Cache-Control", "no-cache", false);
  5. resp.setHeader("Content-Type", "text/plain", false);
  6. let stateKey = "allowMediaState";
  7. let state = getState(stateKey);
  8. setState(stateKey, req.queryString ? "FAIL" : "");
  9. resp.write(state || "PASS");
  10. }