Recently, I used uniAPP to write H5 page. The interface of the back end will return Set_Cookie in the response header after successful login, and then the subsequent interface will keep cookie all the time.
I have been using the token before, but this time I want to use the cookie. I have been hoping to obtain the set-cookie. I checked the document.
Can not get set-cookie, request other interface browser will not take the initiative to bring cookie, Baidu inside not said you can bring it, how my code is not the same??
Sessionid = sessionID; sessionID = sessionID; sessionID = sessionId
Parsing to set unsafe header “cookie”
Tired ~ someone prompt said cookie cross domain, put the interface local proxy under! A cookie? Can also cross domains? I don’t understand, Baidu has the H5 cross-domain solution of UNIapp
Unclear why the press operation, restart the project, and then what use……
What’s this supposed to do after all day
In H5, there is no need to obtain the set-cookie of the response header, because you can not go over, and there is no need to set the cookie, because after login, the browser will read the set-cookie in the response header, and the interface browser will always keep this cookie!
Good problem solved, but how does anyone know it works? Where do you learn this?