{"action":"closed","issue":{"url":"https://api.github.com/repos/Financial-Times/polyfill-service/issues/1276","repository_url":"https://api.github.com/repos/Financial-Times/polyfill-service","labels_url":"https://api.github.com/repos/Financial-Times/polyfill-service/issues/1276/labels{/name}","comments_url":"https://api.github.com/repos/Financial-Times/polyfill-service/issues/1276/comments","events_url":"https://api.github.com/repos/Financial-Times/polyfill-service/issues/1276/events","html_url":"https://github.com/Financial-Times/polyfill-service/issues/1276","id":252942168,"number":1276,"title":"Polyfill always fetched from source with 'age' header value higher than 'max-age' header value.","user":{"login":"romainmenke","id":11521496,"avatar_url":"https://avatars0.githubusercontent.com/u/11521496?v=4","gravatar_id":"","url":"https://api.github.com/users/romainmenke","html_url":"https://github.com/romainmenke","followers_url":"https://api.github.com/users/romainmenke/followers","following_url":"https://api.github.com/users/romainmenke/following{/other_user}","gists_url":"https://api.github.com/users/romainmenke/gists{/gist_id}","starred_url":"https://api.github.com/users/romainmenke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romainmenke/subscriptions","organizations_url":"https://api.github.com/users/romainmenke/orgs","repos_url":"https://api.github.com/users/romainmenke/repos","events_url":"https://api.github.com/users/romainmenke/events{/privacy}","received_events_url":"https://api.github.com/users/romainmenke/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-08-25T15:46:15Z","updated_at":"2017-09-03T18:24:54Z","closed_at":"2017-09-03T18:24:54Z","author_association":"NONE","body":"When requesting `https://cdn.polyfill.io/v2/polyfill.min.js?features=es5,es6,es7,default-3.6,Object.values&flags=gated&version=latest&unknown=ignore` I see the following response headers:\r\n\r\n```\r\naccept-ranges:bytes\r\naccess-control-allow-origin:*\r\nage:1099341\r\ncache-control:public, s-maxage=31536000, max-age=604800, stale-while-revalidate=604800, stale-if-error=604800\r\ncontent-encoding:br\r\ncontent-length:978\r\ncontent-type:application/javascript;charset=utf-8\r\ndate:Fri, 25 Aug 2017 15:37:54 GMT\r\nserver:Cowboy\r\nstatus:200\r\nstrict-transport-security:max-age=31536000; includeSubdomains; preload\r\ntiming-allow-origin:*\r\nvary:User-Agent\r\nvary:Accept-Encoding\r\nvia:1.1 vegur\r\nvia:1.1 varnish\r\nx-cache:HIT\r\nx-cache-hits:1\r\nx-content-type-options:nosniff\r\nx-frame-options:sameorigin\r\nx-served-by:cache-ams4135-AMS\r\nx-timer:S1503675475.984820,VS0,VE0\r\nx-xss-protection:1; mode=block\r\n```\r\n\r\nBecause the `age` value is higher than the `max-age` value the response is never stored in browser cache and always fetched from the CDN.\r\n\r\nWould it be possible to omit the `age` header?\r\n\r\n---\r\n\r\nupdate\r\n\r\nHave done some more research on this. The 'age' header seems to be set by fastly. This seems an incorrect configuration to me as the current cache mechanic for polyfill.io is to store indefinitely in CDN and purge on update. Serving \"stale\", as indicated by the response headers can't be intentional.\r\n"}}
{"actor":{"display_login":"JakeChampion"}}