symfony - symfony2 access control on assets -
for reason ( angularjs top secret js files ) need put behind firewall resources. don't know how setup symfony way. tried set access_control on /web/myresources.js kernel not handle it.
i'd :
- { path: ^/assets/admin/, role: role_admin }
to protect, example : "/assets/admin/js/app.js".
any ideas ? thank you.
edit : created bundle achieve that. not documented yet, here repo :
symfony firewall can work on uris managed symfony. assets static files , not routed through symfony.
use web server config protect such routes. instance, protecting directory index listings in apache:
create .htaccess file following:
options -indexes
or disabling autoindex in nginx:
syntax: autoindex on | off; default: autoindex off; context: http, server, location
enables or disables directory listing output.
Comments
Post a Comment