You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
django-silk makes extensive use of inline <style> and <script> tags in its templates. This makes it very hard to :
Override default behavior of style and/or scripts (whole template needs to be overridden).
-Apply CSP rules properly on a project that wants to use Silk and proper CSP rules (almost all templates must be overridden to add nonce attributes all over the place).
Was there a historical reason to put all these <style> and <script> tags inline? Would a PR addressing this issue be considered OK for maintainers?
The text was updated successfully, but these errors were encountered:
Using <style> and <script> tags are the proper approach actually. We should not use inline styles or scripts.
The solution would be here to add the support for nonce to be injected in every style or script in the templates if it is available in the context, for instance.
This is how all other third party apps added the support for CSP3.
* Outsource all inline scripts and styles. Fixes#531.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
django-silk
makes extensive use of inline<style>
and<script>
tags in its templates. This makes it very hard to :-Apply CSP rules properly on a project that wants to use Silk and proper CSP rules (almost all templates must be overridden to add
nonce
attributes all over the place).Was there a historical reason to put all these
<style>
and<script>
tags inline? Would a PR addressing this issue be considered OK for maintainers?The text was updated successfully, but these errors were encountered: