You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default http.globalAgent that is used by http.request() has all of these values set to their respective defaults.
To configure any of them, a custom http.Agent instance must be created.
AWS JS SDK はローカル試験で Proxy 利用時に S3Client の初期化時パラメータとしてリクエストハンドラの追加が必要であるが、入れ忘れで詰まる方も結構いるため対応済みバージョンのコードを入れた方が有り難いかもしれない。
https://github.com/webdino/lyceum-pokemon/blob/skeleton-halfway/server/utils/s3Client.js
的なコード (要動作検証) だと思うのだけど、AWS JS SDK の公式サンプルが最近 s3Client.js を別途使わない (そんなの分ける意味ねぇって私が愚痴ってたらその通りになった) 形に更新されてましたので、同時に s3Client.js じゃなくて server/utils/trainer.js 内に統合しても良いかも知れない (しそのままでも良い)。
https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javascriptv3/example_code/s3/actions/list-objects.js
このままだと本番デプロイしたときに無駄なものが挟まるのは良くないと思えば環境変数か何かで分岐するコードとしてもよいかもだが、どうも ProxyAgent 自体が proxy 設定環境変数がなければそのまま動くという振る舞いなので (import の無駄とかはあるのだけど) 直接ツッコミでも良い気はする。
The text was updated successfully, but these errors were encountered: