1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-11-23 02:20:50 -05:00

add content-type and access-control headers to hit function response

This commit is contained in:
2021-05-30 19:30:06 -04:00
parent 03bc26a004
commit 37807e008b
6 changed files with 22 additions and 14 deletions

View File

@@ -34,9 +34,13 @@ exports.handler = async (event) => {
return {
statusCode: 200,
headers: {
"Content-Type": "application/json; charset=utf-8",
"Cache-Control": "private, no-cache, no-store, must-revalidate",
Expires: "0",
Pragma: "no-cache",
"Access-Control-Allow-Methods": "GET",
"Access-Control-Allow-Origin": "*",
"x-fauna-ts": result.ts.toString().slice(0, -3),
},
body: JSON.stringify({
slug: result.data.slug,