]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/custom-validators/activitypub/misc.ts
Merge branch 'release/4.3.0' into develop
[github/Chocobozzz/PeerTube.git] / server / helpers / custom-validators / activitypub / misc.ts
index 9d823299fea1db78131676ae4c29ad2ff5e413cc..4619f0eb5d98657a28f846f8f9e1719c94c9403a 100644 (file)
@@ -1,6 +1,6 @@
 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) {
@@ -13,7 +13,7 @@ function isUrlValid (url: string) {
   }
 
   // We validate 'localhost', so we don't have the top level domain
-  if (isTestInstance()) {
+  if (CONFIG.WEBSERVER.HOSTNAME === 'localhost') {
     isURLOptions.require_tld = false
   }