Is it possible to set access-control-allow-origin on getSignedUrl operation for a S3 object? I have been looking out for a list of available params from the aws documentation but it's unclear.
Update: Suppose I have an object "test-file.jpg" in a bucket named "test-bucket". There is no CORS policy set on the bucket. The signed URL created by the getSignedUrl method throws 'no access-control-allow-origin header present' not allowed error in the browser.
var s3 = new aws.S3({'signatureVersion': 'v4'});
var options = {
Bucket:"test-bucket",
Key:"test-file.jpg",
Expires:120
}
var signedUrl = s3.getSignedUrl('getObject', options);
Is there an option to set the access-control-allow-origin : *
in the above function call?
getSignedUrl()
doesn't make any API requests. The signing is done locally -- wherever the SDK is running... so it isn't quite clear what you are asking. – Hanahanae