@@ -24,6 +24,8 @@ type Config struct {
|
||||
AWSRegion string
|
||||
S3UploadPrefix string
|
||||
S3PublicBase string // optional CDN / website endpoint base URL for returned object URLs
|
||||
// S3ObjectACL: optional canned ACL on PutObject (e.g. public-read). Empty = omit ACL (required for Bucket owner enforced buckets).
|
||||
S3ObjectACL string
|
||||
}
|
||||
|
||||
func Load() Config {
|
||||
@@ -74,6 +76,7 @@ func Load() Config {
|
||||
}
|
||||
s3Prefix = strings.Trim(s3Prefix, "/")
|
||||
s3Public := strings.TrimSpace(os.Getenv("S3_PUBLIC_BASE_URL"))
|
||||
s3ObjectACL := strings.TrimSpace(os.Getenv("S3_OBJECT_ACL"))
|
||||
return Config{
|
||||
Addr: addr,
|
||||
DatabaseURL: db,
|
||||
@@ -89,6 +92,7 @@ func Load() Config {
|
||||
AWSRegion: awsRegion,
|
||||
S3UploadPrefix: s3Prefix,
|
||||
S3PublicBase: s3Public,
|
||||
S3ObjectACL: s3ObjectACL,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user