Server: Expires header.

Fixes #221.

Hat tip to @bogdanRada and @0xced.
This commit is contained in:
Thaddee Tyl 2014-07-29 20:14:24 +02:00
parent 077cbb1705
commit f778b9f4f3

View File

@ -144,6 +144,9 @@ function cache(f) {
return function getRequest(data, match, end, ask) {
// Cache management - no cache, so it won't be cached by GitHub's CDN.
ask.res.setHeader('Cache-Control', 'no-cache, no-store, must-revalidate');
var date = (new Date()).toGMTString();
ask.res.setHeader('Expires', date); // Proxies, GitHub, see #221.
ask.res.setHeader('Date', date);
incrMonthlyAnalytics(analytics.vendorMonthly);
if (data.style === 'flat') {
try {