- 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
39 lines
1.2 KiB
HTML
39 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<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">
|
|
<meta name="csrf-token" content="{{ request.state.csrf_token or '' }}">
|
|
<title>{% block title %}OpenRouter Monitor{% endblock %}</title>
|
|
|
|
<!-- Pico.css for styling -->
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@1/css/pico.min.css">
|
|
|
|
<!-- Custom styles -->
|
|
<link rel="stylesheet" href="/static/css/style.css">
|
|
|
|
<!-- HTMX for dynamic content -->
|
|
<script src="https://unpkg.com/htmx.org@1.9.10"></script>
|
|
|
|
<!-- Chart.js for charts -->
|
|
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
|
|
{% block extra_head %}{% endblock %}
|
|
</head>
|
|
<body>
|
|
{% include 'components/navbar.html' %}
|
|
|
|
<main class="container">
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
|
|
{% include 'components/footer.html' %}
|
|
|
|
<!-- Custom JavaScript -->
|
|
<script src="/static/js/main.js"></script>
|
|
|
|
{% block extra_scripts %}{% endblock %}
|
|
</body>
|
|
</html>
|