vary.sjs 300 B

12345678910
  1. function handleRequest(request, response) {
  2. response.setStatusLine(request.httpVersion, 200, "OK");
  3. var header = "no WhatToVary header";
  4. if (request.hasHeader("WhatToVary")) {
  5. header = request.getHeader("WhatToVary");
  6. response.setHeader("Vary", header);
  7. }
  8. response.write(header);
  9. }