From 2b9e23418ed19a49dc518bad58f79d0cd4447c47 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Sat, 30 Mar 2024 12:24:02 -0400 Subject: [PATCH] no-cors mode for preview requests (#116) --- studio-frontend/src/app/api/MakeMultipartRequest.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/studio-frontend/src/app/api/MakeMultipartRequest.ts b/studio-frontend/src/app/api/MakeMultipartRequest.ts index 337a662..c25fe9a 100644 --- a/studio-frontend/src/app/api/MakeMultipartRequest.ts +++ b/studio-frontend/src/app/api/MakeMultipartRequest.ts @@ -11,6 +11,7 @@ const MakeMultipartRequest = (endpoint = "", body: any) => { return fetch("https://funnel.tailce84f.ts.net/preview/", { method: 'POST', + mode: 'no-cors', // NB(bt): Only until the server has Allow-Origin headers credentials: 'include', headers: { 'Accept': 'application/json', @@ -20,4 +21,4 @@ const MakeMultipartRequest = (endpoint = "", body: any) => { .then(res => res.blob()); } -export default MakeMultipartRequest; \ No newline at end of file +export default MakeMultipartRequest;