You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Calling `.DisableAntiforgery()` disables cross-site request forgery (CSRF) protection for the endpoint. This should only be used when an endpoint is not vulnerable to CSRF attacks, such as:
326
+
>
327
+
> * Endpoints that are not callable from a browser (for example, internal APIs)
328
+
> * Endpoints secured with non-cookie-based authentication (for example, bearer tokens or API keys)
329
+
> * Internal or infrastructure endpoints that do not rely on user cookies
330
+
>
331
+
> Do **not** disable antiforgery validation for browser-accessible endpoints that rely on cookies for authentication or that process user-submitted form data, as this exposes your application to CSRF attacks.
332
+
324
333
A POST to:
325
334
326
335
*`/todo` from the form generated by the `/` endpoint succeeds because the antiforgery token is valid.
0 commit comments