mirror of
https://github.com/kevin-DL/sapper-template.git
synced 2026-01-19 21:15:21 +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)) {
|
if (lookup.has(slug)) {
|
||||||
res.set({
|
res.set({
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json'
|
||||||
'Cache-Control': `max-age=${30 * 60 * 1e3}` // cache for 30 minutes
|
|
||||||
});
|
});
|
||||||
|
|
||||||
res.end(lookup.get(slug));
|
res.end(lookup.get(slug));
|
||||||
|
|||||||
@@ -9,8 +9,7 @@ const contents = JSON.stringify(posts.map(post => {
|
|||||||
|
|
||||||
export function get(req, res) {
|
export function get(req, res) {
|
||||||
res.set({
|
res.set({
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json'
|
||||||
'Cache-Control': `max-age=${30 * 60 * 1e3}` // cache for 30 minutes
|
|
||||||
});
|
});
|
||||||
|
|
||||||
res.end(contents);
|
res.end(contents);
|
||||||
|
|||||||
Reference in New Issue
Block a user