Skip to content

Commit

Permalink
feat: temp proxy api
Browse files Browse the repository at this point in the history
  • Loading branch information
capJavert committed Nov 22, 2024
1 parent 2edee40 commit d06b355
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions packages/webapp/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,11 @@ const nextConfig: NextConfig = {
},
];

// to support GitPod environment and avoid CORS issues, we need to proxy the API requests
if (process.env.NEXT_PUBLIC_DOMAIN === 'localhost') {
rewrites.unshift({
source: '/api/:path*',
destination: `${process.env.NEXT_PUBLIC_API_URL}/:path*`,
});
}
// TODO cf just because origin on cf is different for now, remove this before prod
rewrites.unshift({
source: '/api/:path*',
destination: `https://api.daily.dev/:path*`,
});

return rewrites;
},
Expand Down

0 comments on commit d06b355

Please sign in to comment.