Your account expired support, please renew to get your support.

HomePage Forums Themes Support Triply – Tour Booking WordPress Theme Access-Control-Allow-Origin issue

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #34552
    milapolovneva
    Support Expired

    Hello.

    A few weeks ago, we launched a new website built on your theme, Triply Child, and almost immediately encountered some mobile usability issues.

    It looks like crawlers have trouble accessing page resources as zero can be loaded, and the Java Script Console Message complains that access to the fonts we use has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.”

    After the first time it popped up, we added the following code to the .htaccess file to solve the issue.

    # Apache config
    <FilesMatch “.(eot|ttf|otf|woff)”>
    Header set Access-Control-Allow-Origin “*”
    </FilesMatch>

    The solution worked, the website showed no mobile usability problems for a few days, and then the issue came back. Can you please advise on how we can solve the Access-Control-Allow-Origin error?

    Have a great day.

    #34580

    I have installed SSL fix plugin to solve your problem, please check again.
    You can also refer to the solution to this problem here: https://crunchify.com/how-to-fix-access-control-allow-origin-issue-for-your-https-enabled-wordpress-site-and-maxcdn/

    #34598
    milapolovneva
    Support Expired

    Hello.

    Thank you very much for working on my problem.

    The live test of the home page in GSC shows that some page resources were loaded successfully (in contrast to none we had before), but the Java Script error is still on the table. As you can see in the screenshot https://prnt.sc/9tDM4QxMB3d8 we have the same error with the fonts that can’t be loaded due to the CORS policy.

    Can you please advise on what else can be done regarding the Access-Control-Allow-Origin error?

    Best of luck,

    #34624

    Hi,

    The screenshot shows that you are using the CDN service, which caused this Access-Control-Allow-Origin error.
    Please refer to the tutorial link I sent earlier or contact the server support for assistance with this issue.

    #34753
    milapolovneva
    Support Expired

    Thank you for the manual you kindly provided. I changed the original URL from “http” to “https” and added the following code to our.htaccess file to address the font issue specifically:

    <IfModule mod_headers.c>
    <FilesMatch “\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$”>
    Header set Access-Control-Allow-Origin “*”
    </FilesMatch>
    </IfModule>

    However, it seems we are back to square one, as the CORS issue is still there and no resources can be loaded when testing live URL in GSC. What else can we try?

    #34785

    As mentioned above, the problem is caused by your CDN installation, so please contact CDN service support for guidance and assistance in this matter.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.