Skip to content

Commit b4b807c

Browse files
committed
Use POST request for logout
1 parent 99c5753 commit b4b807c

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

templates/base.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,13 @@
199199
</li>
200200
<hr>
201201
<li role="presentation">
202-
<a class="dropdown-item" href="{% url 'logout' %}">
203-
<i class="bi-box-arrow-right" aria-hidden="true"></i>
204-
{% translate "LOG_OUT"%}
205-
</a>
202+
<form method="post" action="{% url 'logout' %}">
203+
{% csrf_token %}
204+
<button type="submit" class="dropdown-item">
205+
<i class="bi-box-arrow-right" aria-hidden="true"></i>
206+
{% translate "LOG_OUT"%}
207+
</button>
208+
</form>
206209
</li>
207210
</ul>
208211
</li>

0 commit comments

Comments
 (0)