From 5a122dddc5aab1b2ae1843411032d5f392bdd216 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 26 Oct 2022 16:23:39 +0200 Subject: Option to disable static files auth check/s3 proxy --- shared/server-commands/server/object-storage-command.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'shared') diff --git a/shared/server-commands/server/object-storage-command.ts b/shared/server-commands/server/object-storage-command.ts index 405e1b043..a1fe4f0f7 100644 --- a/shared/server-commands/server/object-storage-command.ts +++ b/shared/server-commands/server/object-storage-command.ts @@ -81,7 +81,13 @@ export class ObjectStorageCommand extends AbstractCommand { // --------------------------------------------------------------------------- - static getDefaultScalewayConfig (serverNumber: number) { + static getDefaultScalewayConfig (options: { + serverNumber: number + enablePrivateProxy?: boolean // default true + privateACL?: 'private' | 'public-read' // default 'private' + }) { + const { serverNumber, enablePrivateProxy = true, privateACL = 'private' } = options + return { object_storage: { enabled: true, @@ -90,6 +96,14 @@ export class ObjectStorageCommand extends AbstractCommand { credentials: this.getScalewayCredentialsConfig(), + upload_acl: { + private: privateACL + }, + + proxy: { + proxify_private_files: enablePrivateProxy + }, + streaming_playlists: { bucket_name: this.DEFAULT_SCALEWAY_BUCKET, prefix: `test:server-${serverNumber}-streaming-playlists:` -- cgit v1.2.3