プロキシの除外ホスト (#6244)

* プロキシの除外ホスト

* オブジェクトストレージとの通信にProxyを使うかを選択できるように

* fix lint

* コメント

Co-authored-by: rinsuki <428rinsuki+git@gmail.com>
This commit is contained in:
MeiMei
2020-04-12 20:32:34 +09:00
committed by GitHub
parent e7da10ae58
commit 36b9a0d42f
12 changed files with 89 additions and 16 deletions

View File

@@ -6,7 +6,7 @@ import config from '../../config';
import { ILocalUser } from '../../models/entities/user';
import { UserKeypairs } from '../../models';
import { ensure } from '../../prelude/ensure';
import { httpsAgent } from '../../misc/fetch';
import { getAgentByUrl } from '../../misc/fetch';
export default async (user: ILocalUser, url: string, object: any) => {
const timeout = 10 * 1000;
@@ -25,7 +25,7 @@ export default async (user: ILocalUser, url: string, object: any) => {
await new Promise((resolve, reject) => {
const req = https.request({
agent: httpsAgent,
agent: getAgentByUrl(new URL(`https://example.net`)),
protocol,
hostname,
port,