summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/templates/index.html3
-rw-r--r--web/templates/login.html1
2 files changed, 3 insertions, 1 deletions
diff --git a/web/templates/index.html b/web/templates/index.html
index 54bb0c6..c270b48 100644
--- a/web/templates/index.html
+++ b/web/templates/index.html
@@ -6,7 +6,7 @@
<title>Personal Dashboard</title>
<link rel="stylesheet" href="/static/css/output.css">
</head>
-<body class="min-h-screen">
+<body class="min-h-screen" hx-headers='{"X-CSRF-Token": "{{.CSRFToken}}"}'>
<div class="content-max-width py-8">
<!-- Header -->
<header class="mb-8 flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4">
@@ -20,6 +20,7 @@
<span id="refresh-text">Refresh</span>
</button>
<form method="POST" action="/logout" class="no-print">
+ <input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
<button type="submit"
class="text-gray-600 hover:text-gray-900 px-3 py-2 rounded-lg transition-colors font-medium">
Logout
diff --git a/web/templates/login.html b/web/templates/login.html
index e5ce9e4..c865ce5 100644
--- a/web/templates/login.html
+++ b/web/templates/login.html
@@ -18,6 +18,7 @@
{{end}}
<form method="POST" action="/login" class="space-y-6">
+ <input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
<div>
<label for="username" class="block text-sm font-medium text-gray-700 mb-2">
Username