Skip to content

Commit

Permalink
csp: add nonce to htmx script
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentporte committed Jun 19, 2023
1 parent 45759c5 commit 95a8d42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lacommunaute/templates/event/event_calendar.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h1 class="s-title-01__title h1"><strong>Les évènements à venir</strong></h1>
<div class="s-section__col col-12">
{% if user.is_authenticated %}
<a href="{% url 'event:create' %}"
role="button" class="btn btn-primary">
role="button" class="btn btn-primary">
{% trans "Post a new Public Event" %}
</a>
{% else %}
Expand All @@ -55,7 +55,7 @@ <h1 class="s-title-01__title h1"><strong>Les évènements à venir</strong></h1>
<link rel="stylesheet" href="{% static 'vendor/tiva-calendar/css/style.css' %}" />
{% endblock %}
{% block extra_js %}
<script type="text/javascript" src="{% static 'vendor/htmx-1.8.4/htmx.min.js' %}" defer></script>
<script type="text/javascript" src="{% static 'vendor/htmx-1.9.2/htmx.min.js' %}" nonce="{{ request.csp_nonce }}"></script>
<script type="text/javascript" src="{% static 'vendor/tiva-calendar/js/config.js' %}" defer></script>
<script type="text/javascript" src="{% static 'vendor/tiva-calendar/js/calendar.js' %}" defer></script>
<script type="text/javascript" src="{% static 'vendor/tiva-calendar/languages/en.js' %}" defer></script>
Expand Down
2 changes: 1 addition & 1 deletion lacommunaute/templates/layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
{% if COMMU_ENVIRONMENT == 'PROD' %}
<script type="text/javascript" src="{% static 'javascripts/matomo.js' %}" defer></script>
{% endif %}
<script type="text/javascript" src="{% static 'vendor/htmx-1.9.2/htmx.min.js' %}"></script>
<script type="text/javascript" src="{% static 'vendor/htmx-1.9.2/htmx.min.js' %}" nonce="{{ request.csp_nonce }}"></script>
{% endblock %}
</body>
</html>

0 comments on commit 95a8d42

Please sign in to comment.