Illegal websites should not initiate any form of manual service requests to our staff. It is strictly prohibited to use honmau Media's technical support services and products to engage in any illegal activities. If discovered, no technical support will be provided.×
Current location:home> news > help and support

Alibaba Cloud OSS cross-domain error reported after website modification https: Access to XMLHttpRequest at '...' ... blocked by CORS policy: No ‘Access-Control-Allow

The specific error content of the web browser:

Access to XMLHttpRequest at 'https://xxx.oss-cn-hangzhou.aliyuncs.com/' from origin 'http://127.0.0.1' 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.

Solution: Create cross domain rules in the OSS console

In creating cross domain rules,

Set the source to https://www.XXXXXXX.com

  1. Allow all Methods to be checked

  2. Allow headers to be set as*

  3. Expose headers set to ETag and x-oss-request-id

  4. Cache time set to 0

  5. Select to return Vary: Origin.

    20240704100658

© Website copyright and disclaimer

1.[honmau Media] independently owns the copyright of all materials on relevant pages of this website;

2. No one is allowed to copy it without the express written permission of [honmau Media];

3. The articles that do not indicate "honmau Media" on this website are all from the Internet and are only for everyone to learn and refer;

4. If there is any infringement/violation/irregularity, please contact customer service QQ or email to delete it, please understand;

5.[honmau Media] reserves the right to correct, modify and update this statement at any time.legal notice

Message Board
* Contact customer service for urgent issues
submitted
submission
Working days: 8:30 - 22:00 Online QQ

customer service

Company Introduction
top