diff options
-rw-r--r-- | server/helpers/custom-validators/servers.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/helpers/custom-validators/servers.ts b/server/helpers/custom-validators/servers.ts index b9f45c282..94fda05aa 100644 --- a/server/helpers/custom-validators/servers.ts +++ b/server/helpers/custom-validators/servers.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import validator from 'validator' | 1 | import validator from 'validator' |
2 | import { CONFIG } from '@server/initializers/config' | ||
2 | import { CONSTRAINTS_FIELDS } from '../../initializers/constants' | 3 | import { CONSTRAINTS_FIELDS } from '../../initializers/constants' |
3 | import { isTestOrDevInstance } from '../core-utils' | ||
4 | import { exists, isArray } from './misc' | 4 | import { exists, isArray } from './misc' |
5 | 5 | ||
6 | function isHostValid (host: string) { | 6 | function isHostValid (host: string) { |
@@ -10,7 +10,7 @@ function isHostValid (host: string) { | |||
10 | } | 10 | } |
11 | 11 | ||
12 | // We validate 'localhost', so we don't have the top level domain | 12 | // We validate 'localhost', so we don't have the top level domain |
13 | if (isTestOrDevInstance()) { | 13 | if (CONFIG.WEBSERVER.HOSTNAME === 'localhost') { |
14 | isURLOptions.require_tld = false | 14 | isURLOptions.require_tld = false |
15 | } | 15 | } |
16 | 16 | ||