search

Home  >  Q&A  >  body text

About carrying credentials across origins in JavaScript

When I was learning cross-origin resource sharing in JavaScript advanced programming, I tried to use the withCredentials attribute to carry a cookie to request a page in another domain. I found that the cookie I carried was not the cookie I had set before, but another cookie. thing

What are the key-value pairs in this cookie? The name of the cookie I set is cname and the value is cvalue, but it carries these things. What's going on?

習慣沉默習慣沉默2729 days ago549

reply all(1)I'll reply

  • ringa_lee

    ringa_lee2017-06-12 09:30:33

    Have permissions been set in the request header?
    Access-Control-Allow-Credentials: true
    Reference article: http://www.aizelasi.club/arch...

    reply
    0
  • Cancelreply