Przeglądaj źródła

remove 'public' part from Cache-Control, not required

jomo 9 lat temu
rodzic
commit
29fa734148
2 zmienionych plików z 2 dodań i 2 usunięć
  1. 1 1
      lib/response.js
  2. 1 1
      test/test.js

+ 1 - 1
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": "*"

+ 1 - 1
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+