I discovered rewrites to proxy to my back end server in development:
https://nextjs.org/docs/api-reference/next.config.js/rewrites
rewrites: async () => [
...nextI18NextRewrites(localeSubpaths),
{ source: '/api/:path*', destination: 'http://localhost:8080/:path*' },
],
How does this work in production if the url will not be localhost?
For the destination do i need to add the full domain or do i need a separate rewrite rules for dev/production?