aws-sdk-js icon indicating copy to clipboard operation
aws-sdk-js copied to clipboard

CreatePresignedPost URL format is preventing CORS preflight check.

Open ajredniwja opened this issue 1 year ago • 2 comments

Discussed in https://github.com/aws/aws-sdk-js/discussions/4183

Originally posted by colesiegel August 16, 2022 Hi

I'm having the exact same issue as described in https://github.com/aws/aws-sdk-js/issues/2128

The format of the URL returned by createPresignedPost doesn't seem to conform to other standards that are used for PUT URLs returned by getSignedUrl.

I am not sure why the above issue was closed, does anyone know why the URL format is different?

Expected Format: https://[BUCKET_NAME].s3.amazonaws.com Actual Format: https://s3.amazonaws.com/[BUCKET_NAME]

ajredniwja avatar Sep 07 '22 11:09 ajredniwja

Was able to reproduce

ajredniwja avatar Sep 07 '22 11:09 ajredniwja

FWIW @ajredniwja and @colesiegel it appears your expected behaviour now occurs in v3 of the SDK. Have you observed this?

Ironically I was treating the old behaviour as a feature rather than a bug, as it helped me test locally :joy:

roberttaylor426 avatar May 06 '23 07:05 roberttaylor426