Do I need crossSubDomainCookies?
Hello, everyone, so I'm building my application as following:
- frontend: app.mydomain.com
- backend: api.mydomain.com
should I use crossSubDomainCookies? or should I just keep it as is? And also, How can I set this up in development?
Here is my current setup:
4 Replies
yes you should enable cross domain cookies but for development you can disable it.
useSecureCookies by default is set to true on production and false on development I think. But if you are passing it just set it to true on production
For some reason, It works without enabling it. This is my deployed code:
and it works in the frontend without enabling the cross domain cookies, This is my express app index.ts:
Am I doing anything wrong?
It's set to true on both: development and production
Looks correct to me idk why its working even though you have crossDomainCookie disabled lol. For me it was not working.
Yeah I've no idea why it's working either 😂