I'm having a lot of problems with CORS errors. So I want to set header("Access-Control-Allow-Origin: *")
for everything in my WordPress wp-content/themes
directory.
I tried to add it to the .htaccess
in /var/www/html
but this isn't working in /wp-content
Anyone has an idea on how to do this in a WordPress install?
EDIT: It's a self-hosted ubuntu 14.04 server. And the problem arises with static files, so I cannot add the access control to the header function.
EDIT2:
I think I didn't explain the situation correct.
I have a page on my Wordpress site get10things.com this site uses scripts which loads resources from the same domain. However I want to show parts of this site in iframes on other domains and in our Android and iOS app. Therefor I need to enable "Access-Control-Allow-Origin: *" on all resources which are loaded in the scripts which are used on get10things.com.