import validator from 'validator'
+import { CONFIG } from '@server/initializers/config'
import { CONSTRAINTS_FIELDS } from '../../../initializers/constants'
-import { isTestInstance } from '../../core-utils'
import { exists } from '../misc'
function isUrlValid (url: string) {
}
// We validate 'localhost', so we don't have the top level domain
- if (isTestInstance()) {
+ if (CONFIG.WEBSERVER.HOSTNAME === 'localhost' || CONFIG.WEBSERVER.HOSTNAME === '127.0.0.1') {
isURLOptions.require_tld = false
}