From b1053a30f6979ad097965efd1fa661ed37209f78 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 11 Aug 2022 10:43:31 +0200 Subject: Add ability to use docker on local --- server/helpers/custom-validators/activitypub/misc.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/helpers') diff --git a/server/helpers/custom-validators/activitypub/misc.ts b/server/helpers/custom-validators/activitypub/misc.ts index ff15f115f..4619f0eb5 100644 --- a/server/helpers/custom-validators/activitypub/misc.ts +++ b/server/helpers/custom-validators/activitypub/misc.ts @@ -1,6 +1,6 @@ import validator from 'validator' +import { CONFIG } from '@server/initializers/config' import { CONSTRAINTS_FIELDS } from '../../../initializers/constants' -import { isTestOrDevInstance } from '../../core-utils' import { exists } from '../misc' function isUrlValid (url: string) { @@ -13,7 +13,7 @@ function isUrlValid (url: string) { } // We validate 'localhost', so we don't have the top level domain - if (isTestOrDevInstance()) { + if (CONFIG.WEBSERVER.HOSTNAME === 'localhost') { isURLOptions.require_tld = false } -- cgit v1.2.3