I created a folder that will be used to serve static files (CSS, images, fonts and JS, etc.). I ended up CNAME folders in a subdomain for use on CDN to work with my Magento 2 setup.
I want to allow access to all ALL domains through CORS - Cross Origin Policy, and I also want to cache data. This is what I have. (I am not asking for security suggestions or JSONP tips - I want global access to the file directory)
location /cdn-directory/ { location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2|zip|gz|gzip|bz2|csv|xml)$ { add_header Cache-Control "public"; add_header X-Frame-Options "ALLOW-FROM *"; expires +1y; } }
According to the documentation, he says that X-Frame-Options supports ALLOW-FROM uri , but cannot see examples of using * (all domains) or adding specific several domains to this ALLOW-FROM . I need to allow all domains access to my static files folder.
source share