Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy環境下でcreate bookがエラーとなる #61

Open
MichitoIchimaru opened this issue Oct 13, 2022 · 0 comments
Open

Proxy環境下でcreate bookがエラーとなる #61

MichitoIchimaru opened this issue Oct 13, 2022 · 0 comments

Comments

@MichitoIchimaru
Copy link

node-fetchにproxyが考慮されていないので、環境変数に、http_proxyまたはhttps_proxyが定義されていればproxyを指定するように修正していただきたいです。

import HttpsProxyAgent from 'https-proxy-agent/dist/agent'
const proxyAgent = new HttpsProxyAgent('http://[id]:[pw]@[proxy-server]')
const res = await fetch(`https://api.npms.io/v2/search?q=keywords:${KEYWORD}`, { agent: proxyAgent })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant