CSRF header check now covers /login (exemption removed); login.html sends X-Aniweb

This commit is contained in:
jozamudi committed 2026-09-16 02:02:09 +00:00
1 parent b70ef403a9
commit 7f531fc309
4 files changed
+16 -6

No files matched your search

+1 -1
View File
@@ -49,7 +49,7 @@ const next = new URLSearchParams(location.search).get("next");
async function login() {
$("err").textContent = "";
const r = await fetch(BASE + "login", {method: "POST",
headers: {"Content-Type": "application/json"},
headers: {"Content-Type": "application/json", "X-Aniweb": "1"},
body: JSON.stringify({username: $("user").value, password: $("pw").value})});
if (r.ok) {
location.href = next ? BASE + next.replace(/^\/+/, "") : BASE;