-
首先我想对这个项目说一声太赞了!周日的时候眼看从几百星到现在3.7k星,势头太猛了~ 我现在在使用nextjs 框架开发一个类似的项目,本地开发调试一个需要使用代理。想咨询下,在nextjs下应该如何实现类似的效果? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
对接口使用代理,如果使用 node 原生的 fetch 方法,似乎还不能设置代理。 Use a proxy for the request, if the request is made using a request library such as The node native fetch method does not seem to be able to set a proxy yet. |
Beta Was this translation helpful? Give feedback.
-
May I ask if use this kind of 'http-proxy-middleware' in this project, can make users free of proxy?https://github.com/chimurai/http-proxy-middleware @ddiu8081 |
Beta Was this translation helpful? Give feedback.
对接口使用代理,如果使用
undici
等请求库进行请求,可以使用诸如dispatcher
的参数为请求添加代理,参考 3cc6137 .node 原生的 fetch 方法,似乎还不能设置代理。
Use a proxy for the request, if the request is made using a request library such as
undici
, you can add a proxy to the request using a parameter such asdispatcher
The node native fetch method does not seem to be able to set a proxy yet.