preceding "."
# support-questions
c
preceding "."
I noticed that there is a preceding "." when I set cookie_domain to "api-lambda.x.com"
Instead of "api-lambda.x.com", the cookie set is ".api-lambda.x.com"
Is that intended?
r
ye
yes
c
What's the reason behind that?
r
sharing session across api domains
c
Can I disable it?
I only want api-lambda.x.com to receive it
r
yea. just don't set that value
c
If I don't set it, it would be api-lambda.x.com?
r
yes. Automatically
c
Awesome, thanks!
Do you know why it doesnt work if I dont set it for localhost tho?
Under the applications tab, I can see the cookies
Just wont send to the backend
r
not sure what your setup is
c
I have two backends, one for auth and the rest for data
r
right yea.. different ports
c
auth runs on localhost:8001, and the other localhost:8000
r
so you need to set cookie_domain to localhost (i think)
c
ok
so in prod
api.x.com
r
in prod, the value of cookie_domain would be
.x.com
if you have api.x.com and auth.x.com (for example)
c
No i do not want to set it
so it would be api.x.com
r
yea.. then just make it
undefined
in prod
c
right
so if it is api.x.com
my two backends sit behind api.x.com (api gateway)
r
yes
c
the cookies should work right?
Cause they both run on https port 443?
I read a lot of articles and MDN ones about cookies
no one ever mentioned anything about ports though 🧐
r
yea.. cookies should work
c
yeah
I wonder why
hmm