mirror of
https://github.com/kevin-DL/sapper-template.git
synced 2026-01-12 02:15:17 +00:00
remove cache control headers - fixes #17
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user