Skip to content

Commit 5b3fd21

Browse files
committed
More settings, hx-headers back in body
1 parent d900f45 commit 5b3fd21

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

birdle/templates/birdle/base.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
{% block extra_head %}
3535
{% endblock %}
3636
</head>
37-
<body>
37+
<body hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
3838
<nav class="navbar navbar-expand-sm bg-body-tertiary">
3939
<div class="container-fluid">
4040
<a class="navbar-brand mx-md-2" href="{% url 'daily_bird' %}"><i class="fas fa-dove"></i> Birdle</a>
@@ -48,7 +48,7 @@
4848
{% get_regions as regions %}
4949
{% for code, name in regions.items %}
5050
<li>
51-
<a href="#" name={{code}} class="dropdown-item" hx-post="/region" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' hx-target="#region" hx-swap="innerHTML">{{name}}</a>
51+
<a href="#" name={{code}} class="dropdown-item" hx-post="/region" hx-target="#region" hx-swap="innerHTML">{{name}}</a>
5252
</li>
5353
{% endfor%}
5454
</ul>

config/settings.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
184184

185185
CSRF_TRUSTED_ORIGINS = [
186-
'https://www.play-birdle.com/',
187-
'http://www.play-birdle.com/',
188-
'http://www.play-birdle.com/region'
186+
'https://www.play-birdle.com',
187+
'http://www.play-birdle.com',
188+
'https://www.play-birdle.com/region'
189189
]

0 commit comments

Comments
 (0)