Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,14 @@ All values that are described in :ref:`cloudstorage` can be passed as environmen
+---------------------------+-----------------------------------------+-----------------------------+
| GOKAPI_AWS_ENDPOINT | Sets the endpoint | eu-central-000.provider.com |
+---------------------------+-----------------------------------------+-----------------------------+
| GOKAPI_AWS_PROXY_DOWNLOAD | If true, users will not be redirected | true |
| | | |
| | to a pre-signed S3 URL for downloading. | |
| | | |
| | Instead, Gokapi will download the file | |
| | | |
| | and proxy it to the user | |
+---------------------------+-----------------------------------------+-----------------------------+



Expand Down
11 changes: 6 additions & 5 deletions internal/configuration/cloudconfig/CloudConfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ func Delete() error {

func loadFromEnv(env *environment.Environment) CloudConfig {
return CloudConfig{Aws: models.AwsConfig{
Bucket: env.AwsBucket,
Region: env.AwsRegion,
Endpoint: env.AwsEndpoint,
KeyId: env.AwsKeyId,
KeySecret: env.AwsKeySecret,
Bucket: env.AwsBucket,
Region: env.AwsRegion,
Endpoint: env.AwsEndpoint,
KeyId: env.AwsKeyId,
KeySecret: env.AwsKeySecret,
ProxyDownload: env.AwsProxyDownload,
}}
}

Expand Down
2 changes: 2 additions & 0 deletions internal/environment/Environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ type Environment struct {
AwsKeySecret string `env:"AWS_KEY_SECRET"`
// Sets the AWS endpoint
AwsEndpoint string `env:"AWS_ENDPOINT"`
// Proxies downloads through the server instead of redirecting to pre-signed S3 URLs, if set to true
AwsProxyDownload bool `env:"AWS_PROXY_DOWNLOAD" envDefault:"false"`
// List of active deprecations
ActiveDeprecations []deprecation.Deprecation
isSet bool
Expand Down