ovr

Middleware

CSRF

Basic cross-site request forgery (CSRF) protection that checks the request’s method and Origin header. For more robust protection you’ll need a stateful server or a database to store CSRF tokens.

ts
import { csrf } from "ovr";

app.use(csrf({ origin: "https://example.com" }));