From 9239dc28c752bc36960b8f7fc04aeb8cdd44739e Mon Sep 17 00:00:00 2001 From: Kentai Radiquum Date: Wed, 15 May 2024 20:14:37 +0500 Subject: [PATCH] fix(vercel/backend): fix missing CORS headers --- backend/vercel.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/backend/vercel.json b/backend/vercel.json index 70c1e96..10a307c 100644 --- a/backend/vercel.json +++ b/backend/vercel.json @@ -10,5 +10,23 @@ "src": "/(.*)", "dest": "main.py" } + ], + "headers": [ + { + "key": "Access-Control-Allow-Credentials", + "value": "true" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Access-Control-Allow-Methods", + "value": "GET,POST" + }, + { + "key": "Access-Control-Allow-Headers", + "value": "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version" + } ] }