> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# express-cookie-auth-missing-csrf

> Cookie-based session or auth is paired with state-changing routes without CSRF protection or `sameSite: "strict"`.

## What it flags

Cookie-based session or auth is paired with state-changing routes without CSRF protection or `sameSite: "strict"`.

A route that reads a cookie credential is a default-level finding when an app mounts its router after a cookie parser with no CSRF middleware in between. Project middleware mounted before the router, such as `app.use(requireSameOrigin)`, may verify requests, so those routes stay contextual.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "express-cookie-auth-missing-csrf": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.