How does the frontend get cookie across domains?

clipboard.png

for example, the local domain name is aaa.com, but the interface uses bbb.com, so now the cookie sent back from the backend is also on the bbb.com. You can"t get the cookie directly from the local document.cookie. Is there a way to get it

?
Mar.11,2021

due to browser restrictions, the front end cannot get cross-domain cookie. You need to add a request header to the backend

Access-Control-Allow-Origin: http://aaa.com
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Content-Type, Set-Cookie, *
The domain in cookie in

bbb.com is not written, so aaa.com can get it, but it's not good to do so


backend solution or save the front end in session.


if necessary, store it in the browser cache. Cross-domain will bring more security problems


so that the request to access the b server is requested by the a server, and then returned by the a server to the front end

.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5b228-4561d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5b228-4561d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?