It took me over 24 hours of coding to realize heroku was the problem. ugh! herokuapp.com is included in the Mozilla Foundation's Public Suffix List and because I hosted on the herokuapp.com domain, I also deal with the public suffix issue. How else can I host to avoid this issue? (for free because it's a project I just wanna leave on my portfolio.)
You should be able to set cookies. I can say that because I have done various projects using cookies, hosted on heroku.
trust proxy
is enabled. Heroku internally routes through multiple proxies, so you require this. Just add app.set('trust proxy', 1);
if you're using express.sameSite:none
and secure:true
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.