Skip to content

Commit

Permalink
Add api proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmfinol committed Nov 8, 2023
1 parent 0ccbdd2 commit 6f1e451
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 8 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ const withPWA = require("@ducanh2912/next-pwa").default({

module.exports = withPWA({
// Your Next.js config
async rewrites() {
return [
{
source: "/api/proxy/:path*",
destination: `https://:path*`,
},
];
},
//Change `firebase.json`'s "source": "." to "public": "out"
//and the next two lines for Static Website
//output: "export",
Expand Down
7 changes: 0 additions & 7 deletions pages/api/proxy/[...url].tsx

This file was deleted.

0 comments on commit 6f1e451

Please sign in to comment.