-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Content Security Policy (CSP) requires that all script tags be marked with a nonce attribute. Libraries such as django-csp lets us insert this in templates. Django-tempus-dominus inserts a script tag without a nonce, blocking the resource from being used by the browser.
Clunky workaround:
Write script tags as necessary including the nonce:
<script type="text/javascript" nonce="{{request.csp_nonce}}">
new tempusDominus.TempusDominus(
document.getElementById("id_datetime")
);
</script>
Metadata
Metadata
Assignees
Labels
No labels