我發現在開發中重寫代理到我的后端服務器:https://nextjs.org/docs/api-reference/next.config.js/rewritesrewrites: async () => [
...nextI18NextRewrites(localeSubpaths),
{ source: '/api/:path*', destination: 'http://localhost:8080/:path*' },
],如果 url 不是本地主機,這在生產中如何工作?對于目的地,我需要添加完整域還是需要單獨的開發/生產重寫規則?
NextJS 在生產中重寫
DIEA
2023-05-11 14:04:07