ezramod
New member
- Nov 9, 2020
- 16
- 2
- 3
Hi, is it possible to load static files (theme) on a domain and add them to LScache in CDN?
I try to do this but firs appear:
Access to font at 'https://seconddomain.com/wp-content/themes/v2/assets/fontawesome/webfonts/fa-brands-400.woff2' from origin 'https://domain_one.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
after i add in .htaccess
<ifmodule mod_headers.c="">
SetEnvIf Origin "^(.*\.seconddomain\.com)$" ORIGIN_SUB_DOMAIN=$1
Header set Access-Control-Allow-Origin "%{ORIGIN_SUB_DOMAIN}e" env=ORIGIN_SUB_DOMAIN
Header set Access-Control-Allow-Methods: "*"
Header set Access-Control-Allow-Headers: "Origin, X-Requested-With, Content-Type, Accept, Authorization"
</ifmodule>
appear this:
(index):9 GET https://seconddomain.com/wp-content/themes/v2/assets/fontawesome/css/all.css net::ERR_ABORTED 404 - But if i access url files in browser works
second try was to add CNAME in domain one: cdn.domain_one.com to seconddomain.com and receive same error:
(index):9 GET https://cdn.domain_one.com/wp-content/themes/v2/assets/fontawesome/css/all.css net::ERR_ABORTED 404 - But if i access url files in browser works
have something ideea about this ?
I try to do this but firs appear:
Access to font at 'https://seconddomain.com/wp-content/themes/v2/assets/fontawesome/webfonts/fa-brands-400.woff2' from origin 'https://domain_one.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
after i add in .htaccess
<ifmodule mod_headers.c="">
SetEnvIf Origin "^(.*\.seconddomain\.com)$" ORIGIN_SUB_DOMAIN=$1
Header set Access-Control-Allow-Origin "%{ORIGIN_SUB_DOMAIN}e" env=ORIGIN_SUB_DOMAIN
Header set Access-Control-Allow-Methods: "*"
Header set Access-Control-Allow-Headers: "Origin, X-Requested-With, Content-Type, Accept, Authorization"
</ifmodule>
appear this:
(index):9 GET https://seconddomain.com/wp-content/themes/v2/assets/fontawesome/css/all.css net::ERR_ABORTED 404 - But if i access url files in browser works
second try was to add CNAME in domain one: cdn.domain_one.com to seconddomain.com and receive same error:
(index):9 GET https://cdn.domain_one.com/wp-content/themes/v2/assets/fontawesome/css/all.css net::ERR_ABORTED 404 - But if i access url files in browser works
have something ideea about this ?
Last edited: