Merge pull request #2644 from rrgeorge/rrgeorge/csp
Add Content-Security-Policy headers and secure cookies
This commit is contained in:
commit
2c2daf5fdf
18 changed files with 33 additions and 15 deletions
|
@ -1,6 +1,6 @@
|
|||
{% load i18n %}
|
||||
|
||||
<script>
|
||||
<script nonce="{{request.csp_nonce}}">
|
||||
const tour = new Shepherd.Tour({
|
||||
exitOnEsc: true,
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% load i18n %}
|
||||
|
||||
<script>
|
||||
<script nonce="{{request.csp_nonce}}">
|
||||
const tour = new Shepherd.Tour({
|
||||
exitOnEsc: true,
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% load i18n %}
|
||||
|
||||
<script>
|
||||
<script nonce="{{request.csp_nonce}}">
|
||||
const initiateTour = new Shepherd.Tour({
|
||||
exitOnEsc: true,
|
||||
});
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{% load utilities %}
|
||||
{% load user_page_tags %}
|
||||
|
||||
<script>
|
||||
<script nonce="{{request.csp_nonce}}">
|
||||
|
||||
const tour = new Shepherd.Tour({
|
||||
exitOnEsc: true,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% load i18n %}
|
||||
|
||||
<script>
|
||||
<script nonce="{{request.csp_nonce}}">
|
||||
|
||||
let localResult = document.querySelector(".local-book-search-result");
|
||||
let remoteResult = document.querySelector(".remote-book-search-result");
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% load i18n %}
|
||||
|
||||
<script>
|
||||
<script nonce="{{request.csp_nonce}}">
|
||||
const tour = new Shepherd.Tour({
|
||||
exitOnEsc: true,
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% load i18n %}
|
||||
|
||||
<script>
|
||||
<script nonce="{{request.csp_nonce}}">
|
||||
const tour = new Shepherd.Tour({
|
||||
exitOnEsc: true,
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% load i18n %}
|
||||
|
||||
<script>
|
||||
<script nonce="{{request.csp_nonce}}">
|
||||
const tour = new Shepherd.Tour({
|
||||
exitOnEsc: true,
|
||||
});
|
||||
|
|
|
@ -183,7 +183,7 @@
|
|||
{% include 'snippets/footer.html' %}
|
||||
{% endblock %}
|
||||
|
||||
<script>
|
||||
<script nonce="{{request.csp_nonce}}">
|
||||
var csrf_token = '{{ csrf_token }}';
|
||||
</script>
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<title>{% block title %}{% endblock %}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="{% sass_src site_theme %}" rel="stylesheet" type="text/css" />
|
||||
<script>
|
||||
<script nonce="{{request.csp_nonce}}">
|
||||
function closeWindow() {
|
||||
window.close();
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<script nonce="{{request.csp_nonce}}">
|
||||
var csrf_token = '{{ csrf_token }}';
|
||||
</script>
|
||||
<script src="{% static 'js/bookwyrm.js' %}?v={{ js_cache }}"></script>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% load i18n %}
|
||||
<script>
|
||||
<script nonce="{{request.csp_nonce}}">
|
||||
var registerStats = new Chart(
|
||||
document.getElementById('register_stats'),
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% load i18n %}
|
||||
<script>
|
||||
<script nonce="{{request.csp_nonce}}">
|
||||
|
||||
var statusStats = new Chart(
|
||||
document.getElementById('status_stats'),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% load i18n %}
|
||||
<script>
|
||||
<script nonce="{{request.csp_nonce}}">
|
||||
|
||||
var userStats = new Chart(
|
||||
document.getElementById('user_stats'),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% load i18n %}
|
||||
<script>
|
||||
<script nonce="{{request.csp_nonce}}">
|
||||
|
||||
var worksStats = new Chart(
|
||||
document.getElementById('works_stats'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue