Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix: Change CORS for all /api/ routes

Richie McIlroyd21c5309e3d5
diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs
index 7a592f500..fe8dfd723 100644
--- a/apps/web/next.config.mjs
+++ b/apps/web/next.config.mjs
@@ -43,7 +43,24 @@ const nextConfig = {
async headers() {
return [
{
- source: "/api/playlist/(.*)",
+ source: "/api/(.*)",
+ headers: [
+ {
+ key: "Access-Control-Allow-Origin",
+ value: "https://cap.so",
+ },
+ {
+ key: "Access-Control-Allow-Methods",
+ value: "GET",
+ },
+ {
+ key: "Access-Control-Allow-Credentials",
+ value: "true",
+ },
+ ],
+ },
+ {
+ source: "/api/(.*)",
headers: [
{
key: "Access-Control-Allow-Origin",