CORS header Access-Control-Allow-Origin missing for website users
-
Hey everyone,
I’m adding a font using Use Any Font plugin and, despite adding a CORS header with the
*
wildcard to my website in my child theme’sfunctions.php
file, people visiting the website still get the error for the missing CORS header. It works fine if I visit the website URL (live production site, *not* localhost) on my own computer in any browser, but every single other person accessing the site on their computers get the CORS error. Any ideas how to fix this?Thanks in advance! ??
Sincerely,
userwhosmeCORS header in
functions.php
:add_action('init','add_cors_http_header'); function add_cors_http_header(){ header("Access-Control-Allow-Origin: *"); }
Errors in the user’s console: https://snipboard.io/1nzCd9.jpg
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘CORS header Access-Control-Allow-Origin missing for website users’ is closed to new replies.