0003-00000602

更新时间:
复制 MD 格式

Problem description

A cross-origin request to the bucket was rejected due to a CORS configuration mismatch.

Causes

The cross-origin request does not comply with the bucket's cross-origin resource sharing (CORS) configuration.

Examples

The following preflight request is sent to the oss-example bucket:

OPTIONS /testobject HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 24 Feb 2012 05:45:34 GMT
Origin:http://www.example.com
Access-Control-Request-Method:PUT

This request fails if the bucket's CORS configuration does not include PUT in the allowed methods.

Solutions

In the OSS console, verify that the bucket's CORS configuration allows the request's origin, method, and headers. For a detailed walkthrough of common CORS errors and how to fix them, see OSS CORS errors and troubleshooting.