Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix: CORS issues probing

Richie McIlroy2853e709e695
diff --git a/apps/desktop/src/components/windows/inner/Recorder.tsx b/apps/desktop/src/components/windows/inner/Recorder.tsx
index 2dc781df5..d5eaff086 100644
--- a/apps/desktop/src/components/windows/inner/Recorder.tsx
+++ b/apps/desktop/src/components/windows/inner/Recorder.tsx
@@ -83,6 +83,7 @@ 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 48d731ba0..1962ba674 100644
--- a/apps/web/app/api/desktop/video/create/route.ts
+++ b/apps/web/app/api/desktop/video/create/route.ts
@@ -7,11 +7,6 @@ import { nanoId } from "@cap/database/helpers";
export async function OPTIONS(req: NextRequest) {
return new Response(null, {
status: 200,
- headers: {
- "Access-Control-Allow-Origin": "*",
- "Access-Control-Allow-Methods": "GET, OPTIONS",
- "Access-Control-Allow-Headers": "Content-Type, Authorization",
- },
});
}