use more concise syntax for env var checking
This commit is contained in:
parent
1fa92ad763
commit
2232f65410
|
@ -22,7 +22,7 @@ export type IWebFinger = {
|
||||||
const urlRegex = /^https?:\/\//;
|
const urlRegex = /^https?:\/\//;
|
||||||
const mRegex = /^([^@]+)@(.*)/;
|
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()
|
@Injectable()
|
||||||
export class WebfingerService {
|
export class WebfingerService {
|
||||||
|
|
Loading…
Reference in New Issue