• Resolved toniM07

    (@tonim07)


    I added code to server file .htaccess in the public_html directory where WordPress site resides.
    <IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin “*”
    </IfModule>
    However, still have same error showing in Console:
    Access to font at ‘X’ from origin ‘Y’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

    Fontawesome fonts not displaying on the mapped domains. They do display on the primary site https://basalt.guru/

    I tried adding Fontawesome script before closing </head> within Avada Theme options but that did not solve the problem.
    <script src=”https://use.fontawesome.com/6a4381f899.js”></script&gt;

    What am I missing?
    Thanks.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author matthias.wagner

    (@matthiaswagner)

    hy,
    you need to have an exact look at the cors-error. it tells something about invalid characters. looks like your quotes are not valid. try to type them instead of copy/paste ??

    matt

    Thread Starter toniM07

    (@tonim07)

    Thank you for your response. I fixed the quotes for “*” in the .htaccess file in the root directory.

    That removed some of the errors in Console. However, still have error causing social media icons and submenu dropdown indicators not showing correctly
    “Access to font at ‘X’ from origin ‘Y’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.”

    Hosting server is Siteground using NGINX Direct Delivery. Checking Siteground support they say to add the same code to .htaccess (without quotes around *) and disable NGINX caching, which I have done. Have also flushed cache multiple times.

    How to get fontawesome fonts to load?

    Thread Starter toniM07

    (@tonim07)

    Doing a search on Avada Theme website they say to add this to the .htaccess file

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

    https://theme-fusion.com/documentation/avada/how-to/fix-missing-font-awesome-icons-or-custom-fonts/

    Which I did and then checked website on Firefox and Safari browsers that had no previous files cached. Fontawesome icons working correctly. After clearing cookies and cached images on Chrome several times the icons finally showed correctly there too. Adding this info in the event it is useful to others.

    Thank you.

    Plugin Author matthias.wagner

    (@matthiaswagner)

    glad to hear, thanks for the update!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘CORS Header in .htaccess not solving problem’ is closed to new replies.