X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmiddlewares%2Fvalidators%2Foembed.ts;h=0bb908d0b6719363a5f0c4e57279f8f940181b2c;hb=6691c52280363fc42f7865230ebb3741f02fff23;hp=c89bc26de8ae24ce2275971bdefee5bbd33f33ac;hpb=0f6acda11681de90d38dd18669863c6e270851ee;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/middlewares/validators/oembed.ts b/server/middlewares/validators/oembed.ts index c89bc26de..0bb908d0b 100644 --- a/server/middlewares/validators/oembed.ts +++ b/server/middlewares/validators/oembed.ts @@ -5,10 +5,10 @@ import { isTestInstance } from '../../helpers/core-utils' import { isIdOrUUIDValid } from '../../helpers/custom-validators/misc' import { doesVideoExist } from '../../helpers/custom-validators/videos' import { logger } from '../../helpers/logger' -import { CONFIG } from '../../initializers' import { areValidationErrors } from './utils' +import { WEBSERVER } from '../../initializers/constants' -const urlShouldStartWith = CONFIG.WEBSERVER.SCHEME + '://' + join(CONFIG.WEBSERVER.HOST, 'videos', 'watch') + '/' +const urlShouldStartWith = WEBSERVER.SCHEME + '://' + join(WEBSERVER.HOST, 'videos', 'watch') + '/' const videoWatchRegex = new RegExp('([^/]+)$') const isURLOptions = { require_host: true,