From 29fa7341487bc7f8814734f3725182e639e6a2db Mon Sep 17 00:00:00 2001 From: jomo Date: Sat, 23 Jan 2016 06:26:41 +0100 Subject: [PATCH] remove 'public' part from Cache-Control, not required --- lib/response.js | 2 +- test/test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/response.js b/lib/response.js index a5ce1a9..17c300b 100644 --- a/lib/response.js +++ b/lib/response.js @@ -29,7 +29,7 @@ module.exports = function(request, response, result) { // These headers are the same for every response var headers = { "Content-Type": result.body && result.type || "text/plain", - "Cache-Control": "max-age=" + config.caching.browser + ", public", + "Cache-Control": "max-age=" + config.caching.browser, "Response-Time": Date.now() - request.start, "X-Request-ID": request.id, "Access-Control-Allow-Origin": "*" diff --git a/test/test.js b/test/test.js index 42e1a77..6cade92 100644 --- a/test/test.js +++ b/test/test.js @@ -222,7 +222,7 @@ describe("Crafatar", function() { assert("" + res.headers["response-time"]); assert(res.headers["x-request-id"]); assert.equal(res.headers["access-control-allow-origin"], "*"); - assert.equal(res.headers["cache-control"], "max-age=" + config.caching.browser + ", public"); + assert.equal(res.headers["cache-control"], "max-age=" + config.caching.browser); } // throws Exception when +url+ is requested with +etag+