mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-12-01 04:49:16 -06:00
Fix host validation on locahost
This commit is contained in:
parent
cea2fd90dd
commit
e5fc6b5983
@ -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, isArray } from './misc'
|
||||
|
||||
function isHostValid (host: string) {
|
||||
@ -10,7 +10,7 @@ function isHostValid (host: string) {
|
||||
}
|
||||
|
||||
// We validate 'localhost', so we don't have the top level domain
|
||||
if (isTestOrDevInstance()) {
|
||||
if (CONFIG.WEBSERVER.HOSTNAME === 'localhost') {
|
||||
isURLOptions.require_tld = false
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user