1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-10-23 12:54:25 -04:00

update function cache headers

This commit is contained in:
2022-01-03 11:52:32 -05:00
parent 55d9207753
commit aa40d3384c
7 changed files with 16 additions and 29 deletions

View File

@@ -19,12 +19,8 @@ const AIRTABLE_API_ENDPOINT = "https://api.airtable.com/v0/";
const handler = async (req: NextApiRequest, res: NextApiResponse) => {
try {
// permissive access control headers
res.setHeader("Access-Control-Allow-Methods", "POST");
res.setHeader("Access-Control-Allow-Origin", "*");
// disable caching on both ends
res.setHeader("Cache-Control", "private, no-cache, no-store, must-revalidate");
res.setHeader("Expires", 0);
res.setHeader("Pragma", "no-cache");
if (req.method !== "POST") {