From ac26af32cf55beb553a16a64a0866f6870fbcd58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 1 Jul 2020 23:08:17 +0200 Subject: [PATCH] add new config options for the http client (#330) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- pkg/command/frontend.go | 4 ++++ pkg/command/storageeosdata.go | 4 +++- pkg/command/storagehomedata.go | 4 +++- pkg/command/storageocdata.go | 4 +++- pkg/flagset/gateway.go | 4 ++-- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/pkg/command/frontend.go b/pkg/command/frontend.go index e3e6b54ad4..6ce3ec569a 100644 --- a/pkg/command/frontend.go +++ b/pkg/command/frontend.go @@ -121,12 +121,16 @@ func Frontend(cfg *config.Config) *cli.Command { "services": map[string]interface{}{ "datagateway": map[string]interface{}{ "transfer_shared_secret": cfg.Reva.TransferSecret, + "timeout": 86400, + "insecure": true, }, "ocdav": map[string]interface{}{ "prefix": "", "chunk_folder": "/var/tmp/reva/chunks", "files_namespace": cfg.Reva.OCDav.DavFilesNamespace, "webdav_namespace": cfg.Reva.OCDav.WebdavNamespace, + "timeout": 86400, + "insecure": true, "disable_tus": cfg.Reva.UploadDisableTus, }, "ocs": map[string]interface{}{ diff --git a/pkg/command/storageeosdata.go b/pkg/command/storageeosdata.go index 019af03902..7fc8ec56d4 100644 --- a/pkg/command/storageeosdata.go +++ b/pkg/command/storageeosdata.go @@ -128,7 +128,9 @@ func StorageEOSData(cfg *config.Config) *cli.Command { "user_layout": cfg.Reva.Storages.EOS.Layout, }, }, - "temp_folder": cfg.Reva.StorageEOSData.TempFolder, + "timeout": 86400, + "insecure": true, + "disable_tus": false, }, }, }, diff --git a/pkg/command/storagehomedata.go b/pkg/command/storagehomedata.go index 1f11b18112..316f1d6ca1 100644 --- a/pkg/command/storagehomedata.go +++ b/pkg/command/storagehomedata.go @@ -146,7 +146,9 @@ func StorageHomeData(cfg *config.Config) *cli.Command { "prefix": cfg.Reva.Storages.S3.Prefix, }, }, - "temp_folder": cfg.Reva.StorageHomeData.TempFolder, + "timeout": 86400, + "insecure": true, + "disable_tus": false, }, }, }, diff --git a/pkg/command/storageocdata.go b/pkg/command/storageocdata.go index e171da587e..78da2e9b58 100644 --- a/pkg/command/storageocdata.go +++ b/pkg/command/storageocdata.go @@ -146,7 +146,9 @@ func StorageOCData(cfg *config.Config) *cli.Command { "prefix": cfg.Reva.Storages.S3.Prefix, }, }, - "temp_folder": cfg.Reva.StorageOCData.TempFolder, + "timeout": 86400, + "insecure": true, + "disable_tus": false, }, }, }, diff --git a/pkg/flagset/gateway.go b/pkg/flagset/gateway.go index fe2b209367..68c9838a3f 100644 --- a/pkg/flagset/gateway.go +++ b/pkg/flagset/gateway.go @@ -90,8 +90,8 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag { }, &cli.IntFlag{ Name: "transfer-expires", - Value: 24 * 60 * 60, - Usage: "Transfer secret for datagateway", + Value: 24 * 60 * 60, // one day + Usage: "Transfer token ttl in seconds", EnvVars: []string{"REVA_TRANSFER_EXPIRES"}, Destination: &cfg.Reva.TransferExpires, },