aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers')
-rw-r--r--server/initializers/checker-after-init.ts8
-rw-r--r--server/initializers/config.ts5
-rw-r--r--server/initializers/constants.ts8
3 files changed, 20 insertions, 1 deletions
diff --git a/server/initializers/checker-after-init.ts b/server/initializers/checker-after-init.ts
index c83fef425..09e878eee 100644
--- a/server/initializers/checker-after-init.ts
+++ b/server/initializers/checker-after-init.ts
@@ -278,6 +278,14 @@ function checkObjectStorageConfig () {
278 'Object storage bucket prefixes should be set to different values when the same bucket is used for both types of video.' 278 'Object storage bucket prefixes should be set to different values when the same bucket is used for both types of video.'
279 ) 279 )
280 } 280 }
281
282 if (!CONFIG.OBJECT_STORAGE.UPLOAD_ACL.PUBLIC) {
283 throw new Error('object_storage.upload_acl.public must be set')
284 }
285
286 if (!CONFIG.OBJECT_STORAGE.UPLOAD_ACL.PRIVATE) {
287 throw new Error('object_storage.upload_acl.private must be set')
288 }
281 } 289 }
282} 290}
283 291
diff --git a/server/initializers/config.ts b/server/initializers/config.ts
index a5a0d4e46..ab5e645ad 100644
--- a/server/initializers/config.ts
+++ b/server/initializers/config.ts
@@ -118,7 +118,10 @@ const CONFIG = {
118 MAX_UPLOAD_PART: bytes.parse(config.get<string>('object_storage.max_upload_part')), 118 MAX_UPLOAD_PART: bytes.parse(config.get<string>('object_storage.max_upload_part')),
119 ENDPOINT: config.get<string>('object_storage.endpoint'), 119 ENDPOINT: config.get<string>('object_storage.endpoint'),
120 REGION: config.get<string>('object_storage.region'), 120 REGION: config.get<string>('object_storage.region'),
121 UPLOAD_ACL: config.get<string>('object_storage.upload_acl'), 121 UPLOAD_ACL: {
122 PUBLIC: config.get<string>('object_storage.upload_acl.public'),
123 PRIVATE: config.get<string>('object_storage.upload_acl.private')
124 },
122 CREDENTIALS: { 125 CREDENTIALS: {
123 ACCESS_KEY_ID: config.get<string>('object_storage.credentials.access_key_id'), 126 ACCESS_KEY_ID: config.get<string>('object_storage.credentials.access_key_id'),
124 SECRET_ACCESS_KEY: config.get<string>('object_storage.credentials.secret_access_key') 127 SECRET_ACCESS_KEY: config.get<string>('object_storage.credentials.secret_access_key')
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 88bdd07fe..66eb31230 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -685,6 +685,13 @@ const LAZY_STATIC_PATHS = {
685 VIDEO_CAPTIONS: '/lazy-static/video-captions/', 685 VIDEO_CAPTIONS: '/lazy-static/video-captions/',
686 TORRENTS: '/lazy-static/torrents/' 686 TORRENTS: '/lazy-static/torrents/'
687} 687}
688const OBJECT_STORAGE_PROXY_PATHS = {
689 PRIVATE_WEBSEED: '/object-storage-proxy/webseed/private/',
690
691 STREAMING_PLAYLISTS: {
692 PRIVATE_HLS: '/object-storage-proxy/streaming-playlists/hls/private/'
693 }
694}
688 695
689// Cache control 696// Cache control
690const STATIC_MAX_AGE = { 697const STATIC_MAX_AGE = {
@@ -995,6 +1002,7 @@ export {
995 VIDEO_LIVE, 1002 VIDEO_LIVE,
996 PEERTUBE_VERSION, 1003 PEERTUBE_VERSION,
997 LAZY_STATIC_PATHS, 1004 LAZY_STATIC_PATHS,
1005 OBJECT_STORAGE_PROXY_PATHS,
998 SEARCH_INDEX, 1006 SEARCH_INDEX,
999 DIRECTORIES, 1007 DIRECTORIES,
1000 RESUMABLE_UPLOAD_SESSION_LIFETIME, 1008 RESUMABLE_UPLOAD_SESSION_LIFETIME,