nelmio / NelmioSecurityBundle

Adds extra security-related features in your Symfony application

Home Page:https://symfony.com/bundles/NelmioSecurityBundle/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cspscript for encore_entry_script_tags and cspstyle for encore_entry_link_tags

thomas2411 opened this issue · comments

cspscript and cspstyle works only for one script at a time. Both encore_entry_script_tags and encore_entry_link_tags generate multiple <script> and <style> tags by design. Do you think of any solution that could handle this situation? The only thing I can imagine is to add a new tags cspscripts and cspstyle to NelmioSecurityBundle which will handle multiple tags in a loop.
What do you think about it?

Any idea?

I make like this and work fine:
{{ encore_entry_link_tags('backend', null, '_default', {'nonce': csp_nonce('style')}) }}