Commit ffa555f
committed
security: exempt [ApiController] classes from antiforgery validation
API controllers (Chat, McpToken, ListingSourceCode) are called from JS
clients and bearer token auth - they don't use cookie-based auth so CSRF
doesn't apply. Adding [IgnoreAntiforgeryToken] to each prevents the global
AutoValidateAntiforgeryToken filter from rejecting their requests.1 parent 6d06a66 commit ffa555f
3 files changed
Lines changed: 3 additions & 0 deletions
File tree
- EssentialCSharp.Web/Controllers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
0 commit comments