matenia / bootstrap-kaminari-views

MIT License
151 stars 29 forks source link

_gap.html.erb causes ContentSecurityPolicy violations #20

Open Bajena opened 3 years ago

Bajena commented 3 years ago

_gap.html.erb partial includes onclick=return false attribute which's not compliant with best content security policy practices (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src) and causes a CSP violation in Firefox (in Polish, sorry 😅 ): image

Fixing this without forking the gem requires adding unsafe-inline option to CSP settings which makes CSP almost useless