Viewing 1 replies (of 1 total)
  • Hi @deterius,

    The cause of the issue is that GoDaddy is trying to redirect the document loading through secureservercdn.net which is resulting in a “No Access-Control-Allow-Origin header” error. As you’ve already made the adjustment to the htaccess file, the next step would be to set up a CORS rule for the CDN. The following documentation has the required information needed to permit access for the document to be loaded from a CDN: https://wp-pdf.com/kb/hosting-pdfs-on-other-services-such-as-amazon-s3/.

    Once you have the CORS set up correctly, you may see an Invalid PDF Structure / Failed to Fetch error depending on how the CDN for your account is set up. If you do, you should have GoDaddy support create a Post Processing rule to stop anything going to .pdf to remain with the domain and URI path.

    Here is and example of the rule that has been added successfully on a WPEngine site (the same situation as you are seeing—I don’t have an example of GoDaddy’s rule unfortunately) to rectify the issue:
    #https?://sitenamecdn-wpengine\.netdna-ssl\.com/(.*)\.pdf# => https://sitename.com/$1.pdf<https://sitename.com/$1.pdf>;

    This procedure has worked successfully for other users hosting with CDNs.

    If you have any other questions, please feel free to send an email to [email protected] as we may not see messages posted here to respond in a timely fashion.

    Emma

Viewing 1 replies (of 1 total)
  • The topic ‘Access-Control-Allow-Origin Fail to fetch error’ is closed to new replies.