javascript - Why is the cookie not brought?
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-05-19 10:21:18
0
2
578

1. Request the app backend address http://192.168.101.76:1080/te... in the webview of an app, and return the html page as follows

  测试   

2. Issue a jsonp request https://wxwap.money.com/AppAu... in result.js. The return result is as follows, in which the response Header returns the set-cookie field

3. result.js sends another jsonp request https://wxwap.money.com/Inves...,
See that the request header does not bring the cookie set in step 2

Want to know why I didn’t bring cookies? What could be the reason?

曾经蜡笔没有小新
曾经蜡笔没有小新

reply all (2)
Peter_Zhu

If you want to bring cookies when making cross-domain requests using ajax, add a sentencewithcredentials: true. I don’t know if this is your problem..
XMLHttpRequest.withCredentials

    左手右手慢动作

    Post the js code and have a look

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!