firebase / firebase/firebase-admin-node

Impossible to specify an httpAgent when running on GCP infrastructure

オープン
#1,880 コメント 1 件 リアクション 0 件 担当者 1 名 @lahirumaramba が担当を希望しています GitHub で見る
api: core
主要言語
TypeScript
スター
1.7k
フォーク
419
平均マージ
3日 10時間
マージ済み PR(30日)
16

説明

An HTTP agent can be specified in `initializeApp()` using [`AppOptions.httpAgent`](https://github.com/firebase/firebase-admin-node/blob/94dd7c3efb9ff00b0462cf772b803d6abecc2dcc/src/app/core.ts#L85).

When running on GCP infrastructure using application default credentials, the SDK will request the internal metadata server at an `http:` address, see below:

https://github.com/firebase/firebase-admin-node/blob/581e579460bd809912dbffd5680777dd0c8f1a80/src/app/credential-internal.ts#L261-L270

And naturally, all other API requests during operation of the SDK use the `https:` protocol.

This means that it is impossible to provide a native NodeJS `http.Agent` or a `https.Agent` because it will always fail due to the mix of `http:` and `https:` requests it will be used for.

This should either be fixed (e.g. don't use the provided agent for the internal metadata server `http:` request) or documented.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。