Closed jiamo closed 6 years ago
What operation are you trying to create a presigned URL for?
It'd be great if you could post a minimal example of what you're currently trying.
cf_signer = CloudFrontSigner(key_id, rsa_signer)
cf_signer.generate_presigned_url(url, date_less_than=date_less_than)
I creathe the presigned url for user to upload file to s3 and I need the right Content-Type in s3.
I would like to extend this to pass any custom header. I use it to authenticate using IAM. I use a custom header to protect against some replay attacks (basically, I do what Vault does) on the sts:GetCallerIdentity
API.
Unfortunately the CloudFront presigned url spec does not allow for presigning headers, so this is not something we will be able to support.
@JordonPhillips According to custom-policy whether possible could setting parameters of response-content-type
in presigned url to get response with header Content-Type?
Or needed to setting something in AWS?
With
generate_presigned_post(Bucket, Key, Fields=None, Conditions=None, ExpiresIn=3600)
in classS3PostPresigner
, TheFields
can passContent-Type
as a key.While for CloudFront I also need to set the content-type of file while I don't want to set a again after upload by the presigned url which generated by
CloudFrontSigner
'sgenerate_presigned_url
.Is there a easy way to do it? This may be feature request?