fetch credentials mode
The fetch option that decides whether cookies and HTTP authentication are sent: omit, same-origin (the default) or include.
In more detail
Credentials here means cookies, HTTP authentication and client certificates. credentials: 'include' sends cookies on cross-origin requests, but the browser only shows the response if the server replies with Access-Control-Allow-Credentials: true and a specific, non-wildcard origin.
Related terms
- Access-Control-Allow-Credentials — The CORS response header that must be true for the browser to expose a response to a request sent with cookies or other credentials.
- cookie — A small named value a server asks a browser to store and send back automatically on later matching requests.
- CORS — The browser rule set that decides whether web page code from one origin may read a response from a different origin.
Taught in
- Same-Origin Policy, CORS Preflight, Credentials And Headers — Frontend Architecture & Web Platform