From 2232f65410ed9848324d6a04f48c758eb87885a1 Mon Sep 17 00:00:00 2001 From: slonkazoid Date: Sun, 14 Jul 2024 16:11:11 +0300 Subject: [PATCH] use more concise syntax for env var checking --- packages/backend/src/core/WebfingerService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/core/WebfingerService.ts b/packages/backend/src/core/WebfingerService.ts index a242dc5d42..cbbac52cdb 100644 --- a/packages/backend/src/core/WebfingerService.ts +++ b/packages/backend/src/core/WebfingerService.ts @@ -22,7 +22,7 @@ export type IWebFinger = { const urlRegex = /^https?:\/\//; const mRegex = /^([^@]+)@(.*)/; -const defaultProtocol = process.env.MISSKEY_WEBFINGER_USE_HTTP && process.env.MISSKEY_WEBFINGER_USE_HTTP.toLowerCase() === 'true' ? 'http' : 'https'; +const defaultProtocol = process.env.MISSKEY_WEBFINGER_USE_HTTP?.toLowerCase() === 'true' ? 'http' : 'https'; @Injectable() export class WebfingerService {