diff options
author | Chocobozzz <me@florianbigard.com> | 2019-04-11 11:33:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-04-11 13:45:39 +0200 |
commit | 6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0 (patch) | |
tree | b47de7efb8c6c611c63a15a971c6125a278f547a /server/helpers/custom-validators | |
parent | 2c3abc4fa796555eb7d25f416c4f41ab3e3ad8ca (diff) | |
download | PeerTube-6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0.tar.gz PeerTube-6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0.tar.zst PeerTube-6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0.zip |
Move config in its own file
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r-- | server/helpers/custom-validators/video-channels.ts | 2 | ||||
-rw-r--r-- | server/helpers/custom-validators/webfinger.ts | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/server/helpers/custom-validators/video-channels.ts b/server/helpers/custom-validators/video-channels.ts index fad7a9bcf..ca8d207cf 100644 --- a/server/helpers/custom-validators/video-channels.ts +++ b/server/helpers/custom-validators/video-channels.ts | |||
@@ -2,7 +2,7 @@ import * as express from 'express' | |||
2 | import 'express-validator' | 2 | import 'express-validator' |
3 | import 'multer' | 3 | import 'multer' |
4 | import * as validator from 'validator' | 4 | import * as validator from 'validator' |
5 | import { CONFIG, CONSTRAINTS_FIELDS } from '../../initializers' | 5 | import { CONSTRAINTS_FIELDS } from '../../initializers' |
6 | import { VideoChannelModel } from '../../models/video/video-channel' | 6 | import { VideoChannelModel } from '../../models/video/video-channel' |
7 | import { exists } from './misc' | 7 | import { exists } from './misc' |
8 | 8 | ||
diff --git a/server/helpers/custom-validators/webfinger.ts b/server/helpers/custom-validators/webfinger.ts index 80a7e4a9d..b18e43fad 100644 --- a/server/helpers/custom-validators/webfinger.ts +++ b/server/helpers/custom-validators/webfinger.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { CONFIG, REMOTE_SCHEME } from '../../initializers' | 1 | import { REMOTE_SCHEME, WEBSERVER } from '../../initializers' |
2 | import { sanitizeHost } from '../core-utils' | 2 | import { sanitizeHost } from '../core-utils' |
3 | import { exists } from './misc' | 3 | import { exists } from './misc' |
4 | 4 | ||
@@ -11,7 +11,7 @@ function isWebfingerLocalResourceValid (value: string) { | |||
11 | if (actorParts.length !== 2) return false | 11 | if (actorParts.length !== 2) return false |
12 | 12 | ||
13 | const host = actorParts[1] | 13 | const host = actorParts[1] |
14 | return sanitizeHost(host, REMOTE_SCHEME.HTTP) === CONFIG.WEBSERVER.HOST | 14 | return sanitizeHost(host, REMOTE_SCHEME.HTTP) === WEBSERVER.HOST |
15 | } | 15 | } |
16 | 16 | ||
17 | // --------------------------------------------------------------------------- | 17 | // --------------------------------------------------------------------------- |