esedic
11/20/2014 - 12:22 PM

Cross-Origin Resource Sharing policy override with .htaccess

Cross-Origin Resource Sharing policy override with .htaccess

## Situation: you want to load web font or other asset from subdomain
#  Because of the cross origin access policy, you get an error
#  Put this is in .htaccess file inside your root folder and this limitation will be gone
## 
Header add Access-Control-Allow-Origin "*"
Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type"
Header add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"