HttpOnly Cookie

Does httpOnly cookie work if my FE and BE are on the same domain? Because I tried hosting my BE in example.com and FE in abc.com, In this case it doesn't work But it happens to work if my FE: example.com BE: example.com/api || api.example.com
2 Replies
Matvey
Matvey12mo ago
yes, it your cookie is httpOnly, just set it on the backend domain and it will work I think if the domains are entirely different, it will count as a third party cookie and most browsers block those
shaaah
shaaah12mo ago
Thank you for you response @ronanru A follow up question, is it possible to prevent the browser from blocking it?
Want results from more Discord servers?
Add your server