Mount web and api on the same domain?
vinkaga
HOBBYOP
4 months ago
Hello,
Is it possible to mount api (that only serves routes /api ) and web (serves all other routes) on the same hostname?
I am trying to solve many issues related to cookies and auth, and it would be the cleanest solution if it work.
Are there any gotchas?
Thanks.
2 Replies
Railway
BOT
4 months ago
Hey there! We've found the following might help you get unblocked faster:
🧵 Express App
EADDRINUSEerror with PM2 deployment
If you find the answer from one of these, please let us know by solving the thread!
vinkaga
HOBBYOP
4 months ago
I got around this issue by creating a proxy for nestjs api through nextjs web. It adds about 1-5ms delay but the browser is happy with cookies.
Status changed to Solved brody • 5 months ago