Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix: Add Authorization header to CORS

Richie McIlroyd03962df518f
diff --git a/apps/desktop/src/components/windows/inner/Recorder.tsx b/apps/desktop/src/components/windows/inner/Recorder.tsx
index d5eaff086..2dc781df5 100644
--- a/apps/desktop/src/components/windows/inner/Recorder.tsx
+++ b/apps/desktop/src/components/windows/inner/Recorder.tsx
@@ -83,7 +83,6 @@ export const Recorder = () => {
const res = await authFetch(
`${process.env.NEXT_PUBLIC_URL}/api/desktop/video/create`,
{
- credentials: "include",
cache: "no-store",
headers: {
Authorization: `Bearer ${token}`,
diff --git a/apps/web/app/api/desktop/video/create/route.ts b/apps/web/app/api/desktop/video/create/route.ts
index 7a70f3a68..48d731ba0 100644
--- a/apps/web/app/api/desktop/video/create/route.ts
+++ b/apps/web/app/api/desktop/video/create/route.ts
@@ -10,7 +10,7 @@ export async function OPTIONS(req: NextRequest) {
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, OPTIONS",
- "Access-Control-Allow-Headers": "Content-Type",
+ "Access-Control-Allow-Headers": "Content-Type, Authorization",
},
});
}