Skip to content

Commit

Permalink
set caching headers on the request
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Jul 14, 2020
1 parent aca4eac commit 5f79f09
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 0 additions & 4 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
[build]
functions = "dist/lambda"
[[headers]]
for = "/*"
[headers.values]
Cache-Control = "public, max-age=3000"
3 changes: 2 additions & 1 deletion src/lambda/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ exports.handler = async event => {
body: JSON.stringify({
version,
url
})
}),
headers: { 'Cache-Control': 'public, s-maxage=1800' }
};
};

Expand Down
3 changes: 2 additions & 1 deletion src/lambda/repo.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ exports.handler = async event => {
);
return {
statusCode: 200,
body: JSON.stringify(result)
body: JSON.stringify(result),
headers: { 'Cache-Control': 'public, s-maxage=1800' }
};
};

Expand Down

0 comments on commit 5f79f09

Please sign in to comment.