feat(frontend): T46 configure HTMX and CSRF protection
- Add CSRFMiddleware for form protection - Implement token generation and validation - Add CSRF meta tag to base.html - Create tests for CSRF protection Tests: 13 passing
This commit is contained in:
@@ -4,9 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="OpenRouter API Key Monitor - Monitor and manage your OpenRouter API keys">
|
||||
{% if csrf_token %}
|
||||
<meta name="csrf-token" content="{{ csrf_token }}">
|
||||
{% endif %}
|
||||
<meta name="csrf-token" content="{{ request.state.csrf_token or '' }}">
|
||||
<title>{% block title %}OpenRouter Monitor{% endblock %}</title>
|
||||
|
||||
<!-- Pico.css for styling -->
|
||||
|
||||
Reference in New Issue
Block a user