use more concise syntax for env var checking

This commit is contained in:
slonkazoid 2024-07-14 16:11:11 +03:00
parent 1fa92ad763
commit 2232f65410
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -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 {