Skip to content

withCredentials #2

@briefy

Description

@briefy

During http requests, especially if CORS needs, withCredentials is sometimes required.

WHEN do we need withCredentials ?

  1. when we make cross-site Access-Control requiests,cookies ,authorization headers or TLS client certificates are needed to be sent
  2. this flag is used to indicate when cookies are to be ignored in the response,However,keep in mind
    Third-party cookies obtained by setting withCredentials to be true will still honor the same-origin
    policy,CAN NOT be accessed by document.cookie or from response headers
  3. This never affects same-site requests

reference link--https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions