Skip to content

Commit eda6bb2

Browse files
committed
Docs Update : Note for next version
1 parent 24064d1 commit eda6bb2

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

docs/forms.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,11 @@ In your template, you can then render the form fields individually.
9797
<button type="submit">Log In</button>
9898
</form>
9999
```
100+
101+
## CSRF Protection
102+
103+
JsWeb provides built-in CSRF protection. For traditional forms, you can include a hidden `csrf_token` field in your form, as shown in the example above.
104+
105+
> **Note for the Next Version:**
106+
>
107+
> For SPAs and API-first applications, the next version of JsWeb will also support sending the CSRF token in the `X-CSRF-Token` HTTP header. This is the recommended approach for modern web applications.

0 commit comments

Comments
 (0)