Use the webpack dev server proxy for requests

This commit is contained in:
Gabe Kangas
2022-05-08 23:28:54 -07:00
parent 2a8b474fa1
commit 3b3f785984
4 changed files with 11 additions and 5 deletions

View File

@@ -2,4 +2,12 @@ const withLess = require('next-with-less');
module.exports = withLess({
trailingSlash: true,
async rewrites() {
return [
{
source: '/api/:path*',
destination: 'http://localhost:8080/api/:path*', // Proxy to Backend to work around CORS.
},
];
},
});