Skip to content

Commit 465c2d0

Browse files
smyrickabernix
andauthored
docs: Document early CSRF enforcement changes (#8732)
Co-authored-by: Jesse Rosenberger <[email protected]>
1 parent 5cb49ed commit 465c2d0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/source/routing/upgrade/from-router-v1.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,14 @@ could not create router: CORS configuration error:
630630

631631
**Upgrade step****: Validate your CORS configuration. For details, go to [CORS configuration documentation](/graphos/routing/security/cors).
632632

633+
### Early enforcement of CSRF
634+
In Router v1, if you send an empty `Content-Type` header, the Router fails with an HTTP `415` error. The Router now catches this issue earlier in the request lifecycle and returns an HTTP `400` error with the following message:
635+
636+
```text
637+
This operation has been blocked as a potential Cross-Site Request Forgery (CSRF). Please either specify a 'content-type' header (with a mime-type that is not one of application/x-www-form-urlencoded, multipart/form-data, text/plain) or provide one of the following headers: x-apollo-operation-name, apollo-require-preflight
638+
```
639+
640+
633641
## Deploy your router
634642

635643
Make sure that you are referencing the correct router release: **v{products.router.version("connectors").version}**

0 commit comments

Comments
 (0)