Skip to content

Commit

Permalink
Update files/en-us/web/api/fetch_api/using_fetch/index.md
Browse files Browse the repository at this point in the history
Co-authored-by: sideshowbarker <[email protected]>
  • Loading branch information
wbamberg and sideshowbarker authored Jun 28, 2024
1 parent ac66077 commit ce19837
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/en-us/web/api/fetch_api/using_fetch/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ To control whether or not the browser sends credentials, set the `credentials` o

Note that if a cookie's [`SameSite`](/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value) attribute is set to `Strict` or `Lax`, then the cookie will not be sent cross-site, even if `credentials` is set to `include`.

Including credentials in cross-origin requests can make a site vulnerable to {{glossary("CSRF")}} attacks, so even if `credentials` is set to `include`, the server must also agree to their inclusion by including the {{httpheader("Access-Control-Allow-Credentials")}} in its response. Additionally, in this situation the server must explicitly specify the client's origin in the {{httpheader("Access-Control-Allow-Origin")}} response header (that is, `*` is not allowed).
Including credentials in cross-origin requests can make a site vulnerable to {{glossary("CSRF")}} attacks, so even if `credentials` is set to `include`, the server must also agree to their inclusion by including the {{httpheader("Access-Control-Allow-Credentials")}} header in its response. Additionally, in this situation the server must explicitly specify the client's origin in the {{httpheader("Access-Control-Allow-Origin")}} response header (that is, `*` is not allowed).

This means that if `credentials` is set to `include` and the request is cross-origin, then:

Expand Down

0 comments on commit ce19837

Please sign in to comment.