Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 2252

Joomla! 5.x Coding • new google fonts, templateDetails.xml and CORS

$
0
0
Hello,
I tried to add some google fonts files calls in Cassiopeia templateDetails.xml like this:

Code:

<group label="TPL_CASSIOPEIA_FONT_GROUP_WEB"><option value="https://fonts.googleapis.com/css2?family=Fira+Sans:wght@100;300;400;700&amp;display=swap">Fira Sans (web)</option><option value="https://fonts.googleapis.com/css2?family=Noto+Sans:wght@100;300;400;700&amp;family=Roboto:wght@100;300;400;700&amp;display=swap">Roboto + Noto Sans (web)</option><option value="https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@wght@100;300;400;700&amp;family=Lexend:wght@wght@100;300;400;700&amp;family=Urbanist,wght@wght@100;300;400;700&amp;display=swap">Hanken Grotesk + Urbanist + Lexend(web)</option></group>
Third value.
It works in a fashion but I am butting on a CORS problem only on the files I added:
The resource from “[ ....] was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at [....](Reason: CORS request did not succeed). Status code: (null).
Etc...

My question is: what can I do next to avoid these CORS errors ?

NB: this happens on my local server AND on distant server.

Statistics: Posted by ghazal — Wed Oct 23, 2024 12:25 pm



Viewing all articles
Browse latest Browse all 2252

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>