19 days ago
Hi, I have created a full stack application.
My backend is built using java and spring boot and front is react application.
everything is deployed on railway. (refer the image)
problem is my front is unable to communicate my backend.
front end and backend both are hosted having public ip.
ghupchup-production.up.railway.app - backend
https://ghupchup.up.railway.app/ - frontend
i have included the headers.
Request URL
https://ghupchup-production.up.railway.app/user/create?userId=shiv&userName=shiv&password=shiv
Request Method
POST
Status Code
403 Forbidden
Remote Address
66.33.22.216:443
Referrer Policy
strict-origin-when-cross-origin
Attachments
3 Replies
19 days ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
18 days ago
Did you allow your frontend's origin (the public URL) to access your backend?
18 days ago
Hi!
As indicated in https://station.railway.com/questions/spring-boot-app-receiving-403-error-11f3ef1a, this 403 error you are getting is coming from your application not because your front end is not reaching your back end.
Also, as a reminder, if you have server-side requests you are making from front end, you can/should use private address for those. (I can see you do have at least one client-side request, which does require the public address.)