diff --git a/pkg/probo/evidence_service.go b/pkg/probo/evidence_service.go index 6ed200a69..753b74c11 100644 --- a/pkg/probo/evidence_service.go +++ b/pkg/probo/evidence_service.go @@ -304,6 +304,7 @@ func (s EvidenceService) GenerateFileURL( presignedReq, err := presignClient.PresignGetObject(ctx, &s3.GetObjectInput{ Bucket: aws.String(s.svc.bucket), Key: aws.String(evidence.ObjectKey), + ResponseCacheControl: aws.String("max-age=3600, public"), ResponseContentType: aws.String(evidence.MimeType), ResponseContentDisposition: aws.String(contentDisposition), }, func(opts *s3.PresignOptions) { diff --git a/pkg/probo/organization_service.go b/pkg/probo/organization_service.go index 3c57ce740..c95b347c9 100644 --- a/pkg/probo/organization_service.go +++ b/pkg/probo/organization_service.go @@ -18,6 +18,7 @@ import ( "context" "fmt" "io" + "net/url" "time" "github.com/aws/aws-sdk-go-v2/aws" @@ -174,9 +175,15 @@ func (s OrganizationService) GenerateLogoURL( presignClient := s3.NewPresignClient(s.svc.s3) + encodedFilename := url.QueryEscape(organization.Name) + contentDisposition := fmt.Sprintf("attachment; filename=\"%s\"; filename*=UTF-8''%s", + encodedFilename, encodedFilename) + presignedReq, err := presignClient.PresignGetObject(ctx, &s3.GetObjectInput{ - Bucket: aws.String(s.svc.bucket), - Key: aws.String(organization.LogoObjectKey), + Bucket: aws.String(s.svc.bucket), + Key: aws.String(organization.LogoObjectKey), + ResponseCacheControl: aws.String("max-age=3600, public"), + ResponseContentDisposition: aws.String(contentDisposition), }, func(opts *s3.PresignOptions) { opts.Expires = expiresIn }) diff --git a/pkg/probo/vendor_compliance_report_service.go b/pkg/probo/vendor_compliance_report_service.go index cb33b029a..597654521 100644 --- a/pkg/probo/vendor_compliance_report_service.go +++ b/pkg/probo/vendor_compliance_report_service.go @@ -169,6 +169,7 @@ func (s VendorComplianceReportService) GenerateFileURL( presignedReq, err := presignClient.PresignGetObject(ctx, &s3.GetObjectInput{ Bucket: aws.String(s.svc.bucket), Key: aws.String(vendorComplianceReport.FileKey), + ResponseCacheControl: aws.String("max-age=3600, public"), ResponseContentDisposition: aws.String(contentDisposition), }, func(opts *s3.PresignOptions) { opts.Expires = expiresIn