Skip to content

Commit

Permalink
add csp_nonce if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
prauscher authored and jpic committed Apr 12, 2024
1 parent cb00e5a commit 2907da0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion session_security/templates/session_security/all.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

{# Bootstrap a SessionSecurity instance as the sessionSecurity global variable #}
{% localize off %}
<script type="text/javascript">
<script type="text/javascript"{% if request.csp_nonce %} nonce="{{ request.csp_nonce }}"{% endif %}>
var sessionSecurity = new yourlabs.SessionSecurity({
pingUrl: '{% url 'session_security_ping' %}',
warnAfter: {{ request|warn_after|unlocalize }},
Expand Down

0 comments on commit 2907da0

Please sign in to comment.