mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-20 22:03:48 +00:00
a0415cdc41
Removes 38-line hand-rolled HMAC-SHA256 implementation in favour of the built-in hono/csrf, which validates the Origin header natively. - Delete src/utils/csrf.ts - Replace custom CSRF middleware with hono/csrf (Origin-header check) - Remove csrfToken from ContextVariableMap, layout(), forms, and JS fetch() calls - Update admin tests: swap X-CSRF-Token for Origin header Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
9 lines
166 B
TypeScript
9 lines
166 B
TypeScript
import { Env } from "./index";
|
|
|
|
// Extend Hono's types to include our custom environment
|
|
declare module "hono" {
|
|
interface ContextVariableMap {
|
|
env: Env;
|
|
}
|
|
}
|