Cookies not being set on custom domain

ProjectId: bbc6effd-a99c-4a22-abaf-96862a807ea3 ServiceId: 02bd8d7b-1f86-43e5-9ead-78f3b7738bae Hi, Our NextJs front-end runs fine without a custom domain (on .up.railway.app) and the cookies get set specifically JSESSIONID and XSRF-TOKEN from our Backend, also hosted on Railway. Auth works great. However, after setting up a custom domain, auth fails and after further inspection it looks like the cookies are not being set. Even the default railway cookies, are also not being set. Followed the custom domain instructions and it says setup complete. Please assist.
9 Replies
Percy
Percy12mo ago
Project ID: bbc6effd-a99c-4a22-abaf-96862a807ea3,02bd8d7b-1f86-43e5-9ead-78f3b7738bae
Brody
Brody12mo ago
I think this is because you aren't trusting railways proxy headers, look into doing that first
tichkames
tichkames12mo ago
Okay, how would I go about doing that in my application. I'm running a NextJS front-end with a SpringBoot backend
Brody
Brody12mo ago
that's not really specific to railway, so please consult spring boot's docs
tichkames
tichkames12mo ago
So I added to my config: server: forward-headers-strategy: NATIVE and now the whole things fails including auth on the default (.up.railway.app). Btw the whole thing works on that default domain but fails when I introduce a custom domain
Brody
Brody12mo ago
please consult spring boot's docs
tichkames
tichkames12mo ago
That's what I have done hence I updated our config. By the way only our front-end has a custom domain. Should we still not be seeing the default (railway) cookies being set here ? This front-end is not based on SpringBoot.
tichkames
tichkames12mo ago
Here is an example of the cookies that not getting set on the custom domain but are available on the default .up.railway.app
No description
Brody
Brody12mo ago
please look into how you would trust a proxy and how you set headers when behind a proxy
Want results from more Discord servers?
Add your server