diff options
author | Chocobozzz <me@florianbigard.com> | 2020-04-07 15:27:41 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-04-07 15:32:20 +0200 |
commit | 8c9e7875269a990ed3000e1d4995d808e4ff50f7 (patch) | |
tree | 896f60aedf0fac0dc64b57ff76a63e7a718c0a5b /server/initializers/config.ts | |
parent | bc30363602ad504d784662a9373c0a114d05042c (diff) | |
download | PeerTube-8c9e7875269a990ed3000e1d4995d808e4ff50f7.tar.gz PeerTube-8c9e7875269a990ed3000e1d4995d808e4ff50f7.tar.zst PeerTube-8c9e7875269a990ed3000e1d4995d808e4ff50f7.zip |
Add ability to accept or not remote redundancies
Diffstat (limited to 'server/initializers/config.ts')
-rw-r--r-- | server/initializers/config.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/server/initializers/config.ts b/server/initializers/config.ts index 3c07624e8..2c4d26a9e 100644 --- a/server/initializers/config.ts +++ b/server/initializers/config.ts | |||
@@ -5,6 +5,7 @@ import { VideosRedundancyStrategy } from '../../shared/models' | |||
5 | import { buildPath, parseBytes, parseDurationToMs, root } from '../helpers/core-utils' | 5 | import { buildPath, parseBytes, parseDurationToMs, root } from '../helpers/core-utils' |
6 | import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type' | 6 | import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type' |
7 | import * as bytes from 'bytes' | 7 | import * as bytes from 'bytes' |
8 | import { VideoRedundancyConfigFilter } from '@shared/models/redundancy/video-redundancy-config-filter.type' | ||
8 | 9 | ||
9 | // Use a variable to reload the configuration if we need | 10 | // Use a variable to reload the configuration if we need |
10 | let config: IConfig = require('config') | 11 | let config: IConfig = require('config') |
@@ -117,6 +118,11 @@ const CONFIG = { | |||
117 | STRATEGIES: buildVideosRedundancy(config.get<any[]>('redundancy.videos.strategies')) | 118 | STRATEGIES: buildVideosRedundancy(config.get<any[]>('redundancy.videos.strategies')) |
118 | } | 119 | } |
119 | }, | 120 | }, |
121 | REMOTE_REDUNDANCY: { | ||
122 | VIDEOS: { | ||
123 | ACCEPT_FROM: config.get<VideoRedundancyConfigFilter>('remote_redundancy.videos.accept_from') | ||
124 | } | ||
125 | }, | ||
120 | CSP: { | 126 | CSP: { |
121 | ENABLED: config.get<boolean>('csp.enabled'), | 127 | ENABLED: config.get<boolean>('csp.enabled'), |
122 | REPORT_ONLY: config.get<boolean>('csp.report_only'), | 128 | REPORT_ONLY: config.get<boolean>('csp.report_only'), |