From cb59bc85bf3eb1d87d4fd20074af02b8589873d0 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 1 Jan 2018 19:47:29 -0500 Subject: [PATCH] remove cache control headers - fixes #17 --- routes/api/blog/[slug].js | 3 +-- routes/api/blog/index.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/routes/api/blog/[slug].js b/routes/api/blog/[slug].js index 8433e91..f1a151f 100644 --- a/routes/api/blog/[slug].js +++ b/routes/api/blog/[slug].js @@ -12,8 +12,7 @@ export function get(req, res, next) { if (lookup.has(slug)) { res.set({ - 'Content-Type': 'application/json', - 'Cache-Control': `max-age=${30 * 60 * 1e3}` // cache for 30 minutes + 'Content-Type': 'application/json' }); res.end(lookup.get(slug)); diff --git a/routes/api/blog/index.js b/routes/api/blog/index.js index 0a42690..4c10788 100644 --- a/routes/api/blog/index.js +++ b/routes/api/blog/index.js @@ -9,8 +9,7 @@ const contents = JSON.stringify(posts.map(post => { export function get(req, res) { res.set({ - 'Content-Type': 'application/json', - 'Cache-Control': `max-age=${30 * 60 * 1e3}` // cache for 30 minutes + 'Content-Type': 'application/json' }); res.end(contents);