2 months ago
Hello Railway team,
I am experiencing a serious issue with my project and need your help.
Project: emparejador-jugadores
Public domain:https://emparejador-jugadores-production.up.railway.app
Project ID: 1e75c5d6-a93d-4ceb-99c8-af1187908b55
Problem:
All HTTP requests to any endpoint of my backend (for example, /api/public/health or /test) always return HTTP 403 Forbidden.
The error occurs from the browser, Postman, curl, and my Android app.
The backend starts correctly, there are no errors in the logs, and the database connection works fine.
I have tried with security completely disabled (.anyRequest().permitAll() in Spring Security).
I have regenerated the public domain, changed the project visibility to PUBLIC, and tried both Metal Edge and Google Cloud Edge.
I have created new projects from scratch and the error persists.
The 403 is returned by the Railway proxy, not my backend (no access logs reach my controllers).
I have checked:
Environment variables (all correct).
Security and CORS configuration (all open).
Project visibility (set to PUBLIC).
No access rules or firewall configured.
Can you help me unlock public access to my backend?
Is there any restriction, bug, or internal configuration causing this global 403?
Thank you in advance for your help!
4 Replies
2 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • 2 months ago
2 months ago
Can you share your project repository? How are you sure the requests aren't reaching your backend?
Many frameworks have security systems in place that you can configure.
2 months ago
It seems to be a classic it works on my machine but not on railway. This usually occurs couple of ways.
1. Misconfigured port: Application is listening on a different port than what railway is aware of
2. Listening on wrong network interface: You could likely be listening on localhost (127.0.0.1) so it worked during your local dev but railway runs services in containers so they are inaccessible. You need to change it to listen on all interfaces (0.0.0.0)
This is likely a networking issue. Either in the code or on railway.
Can you post the file src/main/resources/application.properties
or application.yml
for the server.port
setting ?
The working startup logs on railway should also be useful and screenshot of your service -> settings -> networking.
2 months ago
I had a similar problem *tho not super sure if its similar
Paste your Dockerfile if you are using docker to build your application
2 months ago
If you have implemented any logs in your controllers, they will not be accessed before authentication.
Could you give more details?
Apparently you are using Spring Boot, which version are you using?
I ask because maybe there is something missing.