2

Access to XMLHttpRequest at 'https://s3.amazonaws.com/Learn.svg' from origin 'https://php.example.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

We have used WordPress Pro plugin https://wordpress.org/plugins/amazon-s3-and-cloudfront/ with Amazon s3 bucket.

We have to get this error on SVG extension.

We used below code in .htaccess file.

<IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
</IfModule>

AddType image/svg+xml svg svgz

Below header type code in the server config file

Access-Control-Allow-Origin "*"
Mahesh Patel
  • 31
  • 1
  • 3

0 Answers0