For some reason, allowCredentials option is not working on s3.amazonaws.com. Looks like some trouble with OPTIONS part of request.
Anyway ,changing if (populatedEndpoint.method === 'GET' && !_.isUndefined(policy.allowCredentials)) {
to
if ( !_.isUndefined(policy.allowCredentials)) {
solved the issue.
I'm posting this just in case someone may face similar problem in future.
The Access-Control-Allow-Credentials header is required on non-GET requests even if the preflight has it in Chrome. This is not specific to s3 and seems like a bug to me.
For some reason, allowCredentials option is not working on s3.amazonaws.com. Looks like some trouble with OPTIONS part of request.
Anyway ,changing
if (populatedEndpoint.method === 'GET' && !_.isUndefined(policy.allowCredentials)) {
toif ( !_.isUndefined(policy.allowCredentials)) {
solved the issue.I'm posting this just in case someone may face similar problem in future.