summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/FetchInstanceMetadataService.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-01-25 15:16:07 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-01-25 15:16:07 +0900
commit9ffecf25dce526006082be12a5a4165e0bf92f4a (patch)
treed8ae5314a066bff929f4f989ec64ba981e4a1812 /packages/backend/src/core/FetchInstanceMetadataService.ts
parentMerge branch 'develop' (diff)
parent13.2.2 (diff)
downloadmisskey-9ffecf25dce526006082be12a5a4165e0bf92f4a.tar.gz
misskey-9ffecf25dce526006082be12a5a4165e0bf92f4a.tar.bz2
misskey-9ffecf25dce526006082be12a5a4165e0bf92f4a.zip
Merge branch 'develop'
Diffstat (limited to 'packages/backend/src/core/FetchInstanceMetadataService.ts')
-rw-r--r--packages/backend/src/core/FetchInstanceMetadataService.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/backend/src/core/FetchInstanceMetadataService.ts b/packages/backend/src/core/FetchInstanceMetadataService.ts
index cb9d099a22..35f30deeb4 100644
--- a/packages/backend/src/core/FetchInstanceMetadataService.ts
+++ b/packages/backend/src/core/FetchInstanceMetadataService.ts
@@ -2,6 +2,7 @@ import { URL } from 'node:url';
import { Inject, Injectable } from '@nestjs/common';
import { JSDOM } from 'jsdom';
import tinycolor from 'tinycolor2';
+import fetch from 'node-fetch';
import type { Instance } from '@/models/entities/Instance.js';
import type { InstancesRepository } from '@/models/index.js';
import { AppLockService } from '@/core/AppLockService.js';
@@ -190,7 +191,9 @@ export class FetchInstanceMetadataService {
const faviconUrl = url + '/favicon.ico';
- const favicon = await this.httpRequestService.fetch(faviconUrl, {}, { noOkError: true });
+ const favicon = await this.httpRequestService.send(faviconUrl, {
+ method: 'HEAD',
+ }, { throwErrorWhenResponseNotOk: false });
if (favicon.ok) {
return faviconUrl;