Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix: Add more CORS options

Richie McIlroy32115e55eca0
diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs
index fe8dfd723..44ee24426 100644
--- a/apps/web/next.config.mjs
+++ b/apps/web/next.config.mjs
@@ -43,7 +43,7 @@ const nextConfig = {
async headers() {
return [
{
- source: "/api/(.*)",
+ source: "/api/playlist/(.*)",
headers: [
{
key: "Access-Control-Allow-Origin",
@@ -51,7 +51,7 @@ const nextConfig = {
},
{
key: "Access-Control-Allow-Methods",
- value: "GET",
+ value: "GET, POST, PUT, DELETE, OPTIONS",
},
{
key: "Access-Control-Allow-Credentials",
@@ -60,7 +60,7 @@ const nextConfig = {
],
},
{
- source: "/api/(.*)",
+ source: "/api/playlist/(.*)",
headers: [
{
key: "Access-Control-Allow-Origin",
@@ -68,7 +68,7 @@ const nextConfig = {
},
{
key: "Access-Control-Allow-Methods",
- value: "GET",
+ value: "GET, POST, PUT, DELETE, OPTIONS",
},
{
key: "Access-Control-Allow-Credentials",