我试图在我的ASP.NET核心3 web应用程序中使用AWS来访问客户机上的s3桶,但它不起作用。
我一直在浏览器控制台中得到以下错误,比如没有为桶配置的CORS:
Access to XMLHttpRequest at 'https://<bucket>.s3.eu-west-2.amazonaws.com/?list-type=2' from origin 'https://localhost:5001' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Access to XMLHttpRequest at 'https://<bucket>.s3.amazonaws.com/?max-keys=0' from origin 'https://localhost:5001' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.
我的配置有什么问题?怎么让它起作用?
发布于 2019-12-18 16:35:15
使用HTTP欺骗了所有HTTP请求,发现该区域是不正确的。如果有人有相同的问题和CORS配置似乎是正确的-检查区域。
在我的例子中,法兰克福服务器不是eu-west-2,而是eu-central-1。
https://stackoverflow.com/questions/59396192
复制相似问题