The problem of axios carrying cookie across domains

when logging in, the backend
Set-Cookie:JSESSIONID=NmM4Yzk3OTQtZDE2Ni00NWQxLWIyYzAtYjRhN2UyNDA0MmEw; path=/; HttpOnly
but when sending a request with axios, it still does not bring cookie, and it is not possible to set withCredentials: true. I would like to ask you, how to troubleshoot and solve this problem?
clipboard.png
clipboard.png

May.12,2022

the people upstairs are all misleading people. The main purpose of cookie with the HttpOnly attribute set is to prevent XSS , so you cannot access it using the JavaScript Document.cookie attribute, XMLHttpRequest and fetch .

this kind of problem should refer to the RFC document:

https://tools.ietf.org/html/r...

this depends on what browser you can't use? Is it under chrome


response header Set-Cookie you should specify Domain
for example:
Set-Cookie:JSESSIONID=NmM4Yzk3OTQtZDE2Ni00NWQxLWIyYzAtYjRhN2UyNDA0MmEw; domain=codeshelper.com; path=/; HttpOnly


website domain name is a subdomain name of www.ceshi.com, if not, you can't set it up;
reference: https://codeshelper.com/a/11...

"
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-1e8c83a-10e3.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-1e8c83a-10e3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?