Amazon web services 允许原产地:*不';不能处理多个域
对于我的s3存储桶,我有一个带有通配符原始规则的CORs配置文件Amazon web services 允许原产地:*不';不能处理多个域,amazon-web-services,amazon-s3,Amazon Web Services,Amazon S3,对于我的s3存储桶,我有一个带有通配符原始规则的CORs配置文件* 我收到了这个错误 XMLHttpRequest cannot load https://cognito-identity.us-east-1.amazonaws.com/. Response to preflight request doesn't pass access control check: A wildcard '*' cannot be used in the 'Access-Control-Allow-Ori
*
我收到了这个错误
XMLHttpRequest cannot load https://cognito-identity.us-east-1.amazonaws.com/.
Response to preflight request doesn't pass access control check:
A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header
when the credentials flag is true.
Origin 'http://localhost:8100' is therefore not allowed access.
因此,我将规则更改为http://localhost:8100
但是在更改我的CORs配置文件之后;我仍然收到上面的错误,来自s3的响应头仍然显示通配符设置-访问控制允许源代码:
这个CORs文件缓存在什么地方了吗?如果是,我如何刷新/重置它,我已经尝试从bucket中删除CORs配置,并创建一个新配置,但这并不能解决问题。
我的CORs配置文件(编辑前后)如下所示
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
*
放
邮递
*
*
得到
*
我把这个改成了
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>http://localhost:8100</AllowedOrigin>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
<CORSRule>
<AllowedOrigin>http://localhost:8100</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
http://localhost:8100
放
邮递
*
http://localhost:8100
得到
*
任何帮助都将不胜感激。问题可能与您正在使用“localhost”进行测试有关,在某些情况下,这是一个神奇的值。尝试使用
http://lvh.me:8100/
相反,看看这是否有区别。@michael sqlbot我刚刚尝试了这个,我仍然收到标题-访问控制允许源代码:
在我的响应中,所以它没有修复它。该文件似乎被缓存在某个地方,因为即使我删除该文件,我仍然会得到相同的响应。