Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentporte committed Sep 20, 2023
1 parent 1e7d599 commit e2545ae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
7 changes: 6 additions & 1 deletion config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,16 @@
# CSP
# ---------------------------------------
CSP_DEFAULT_SRC = ("'self'",)
# unsafe-inline for htmx.js, embed.js & tartecitron.js needs
CSP_STYLE_SRC = ("'self'", "https://fonts.googleapis.com", "'unsafe-inline'")
CSP_STYLE_SRC_ELEM = CSP_STYLE_SRC
CSP_FONT_SRC = ("'self'", "https://fonts.gstatic.com/", "data:")
CSP_SCRIPT_SRC = ("'self'", "https://cdn.jsdelivr.net", "https://tally.so")
CSP_SCRIPT_SRC = (
"'self'",
"https://cdn.jsdelivr.net",
)
CSP_SCRIPT_SRC_ELEM = CSP_SCRIPT_SRC
CSP_FRAME_SRC = ("'self'", "https://tally.so")
CSP_IMG_SRC = ("'self'", "data:")
CSP_INCLUDE_NONCE_IN = ["script-src", "script-src-elem"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,5 @@
</div>

<script nonce="{{ request.csp_nonce }}">
document.getElementById(`collapseButtonPost{{topic.pk}}`).setAttribute('aria-expanded', 'false');
document.getElementById(`showmoreposts-button{{topic.pk}}`).className = 'd-none';
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
data-matomo-category="engagement"
data-matomo-action="showmore"
data-matomo-option="post"
onclick=DisabledMe("showmoreposts-button{{topic.pk}}")
aria-label="{% trans "Show me the comment" %}"
role="button"
>
Expand Down

0 comments on commit e2545ae

Please sign in to comment.