From 3f7debd224e6ade227f8314a9e1818cbca308352 Mon Sep 17 00:00:00 2001 From: Kamil Troczewski Date: Thu, 5 Jun 2025 02:37:41 +0200 Subject: [PATCH] docs: add Content-Type header for JWT authentication (#12513) ### What? Fix docs fragment about JWT strategy authentication ### Why? The example in docs doesn't work out of the box image Solution is to set `Content-Type: application/json` image --- docs/authentication/jwt.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/authentication/jwt.mdx b/docs/authentication/jwt.mdx index 45fed80747..5171aeed99 100644 --- a/docs/authentication/jwt.mdx +++ b/docs/authentication/jwt.mdx @@ -23,6 +23,9 @@ Example: ```ts const user = await fetch('http://localhost:3000/api/users/login', { method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, body: JSON.stringify({ email: 'dev@payloadcms.com', password: 'password',