mirror of
https://github.com/simonw/datasette.git
synced 2026-06-17 22:37:48 +02:00
- New CSRF protection middleware inspired by Go 1.25 and research by Filippo Valsorda - https://words.filippo.io/csrf/ - this replaces the old CSRF token based protection. - Removes all instances of `<input type="hidden" name="csrftoken" value="{{ csrftoken() }}">` in the templates - they are no longer needed. - Removes the `def skip_csrf(datasette, scope):` plugin hook defined in `datasette/hookspecs.py` and its documentation and tests. - Updated CSRF protection documentation to describe the new approach. - Upgrade guide now describes the CSRF change.
26 lines
643 B
HTML
26 lines
643 B
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Debug messages{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<h1>Debug messages</h1>
|
|
|
|
<p>Set a message:</p>
|
|
|
|
<form class="core" action="{{ urls.path('-/messages') }}" method="post">
|
|
<div>
|
|
<input type="text" name="message" style="width: 40%">
|
|
<div class="select-wrapper">
|
|
<select name="message_type">
|
|
<option>INFO</option>
|
|
<option>WARNING</option>
|
|
<option>ERROR</option>
|
|
<option>all</option>
|
|
</select>
|
|
</div>
|
|
<input type="submit" value="Add message">
|
|
</div>
|
|
</form>
|
|
|
|
{% endblock %}
|