Skip to content

请教一下 nextjs 框架下版本下如何实现本地 proxy 的功能? #189

Answered by ddiu8081
arvinxx asked this question in Q&A
Discussion options

You must be logged in to vote

对接口使用代理,如果使用 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 as dispatcher

The node native fetch method does not seem to be able to set a proxy yet.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@arvinxx
Comment options

@ddiu8081
Comment options

@arvinxx
Comment options

Answer selected by arvinxx
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants