3

Unable to get screenshot of Rich Text Area Field which contains images html2canvas

Access to Image at xxx site from origin xxx site has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin xxx site is therefore not allowed access.

1 Answer 1

0

The CORS standard, implemented in the browser generates this error.

To fix the issue, include the following in your header block.

   <script runat=server>
   Platform.Load("core","1");
   HTTPHeader.SetValue("Access-Control-Allow-Methods","POST");
   HTTPHeader.SetValue("Access-Control-Allow-Origin","*");
   </script>

Here's a related StackOverflow question, for more context.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.