6 months ago
Hello,
I am trying to connect to my app from frontend and also Postman.
I turned off security and tried http, https, ports and nothing help.
Can you please help me with connection?
Thank you
Martin
Attachments
Pinned Solution
6 months ago
What you're trying to do here is you're trying to use the public domain without the correct structure necassery for it to function. The public domain works via https, you can't use it via http. The other problem is that if you were to use the public domain- it wouldn't be reachable at 8080 because Railway services are only exposed on port 448 for public facing domains.
You need to use: https://be-gymadmin-production.up.railway.app/api/customer/create instead, that way you're using https which defaults to port 448.
If you're trying to use a private domain instead then you can use the private domain from within the service settings, it'd look something like http://something.railway.internal, although for your use-case you lkely don't want this since from what I could gather you're trying to reach this endpoint from your frontend and the private domain is only usable in the backend.
CORS issues are just a configurations you need to fix in your server
9 Replies
6 months 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!
6 months ago
Hi!
Have you confirmed that your process is listening on port 8080? Can you share the latest deployment's logs?
samgordon
Hi!Have you confirmed that your process is listening on port 8080? Can you share the latest deployment's logs?
6 months ago
The URL is working fine, so the server is listening on the correct port
6 months ago
What issue are you experiencing? Your site works fine for me, the only issue I see is that it has no index page so it's 404ing but I assume it has other endpoints
dev
The URL is working fine, so the server is listening on the correct port
6 months ago
Oop! Should have checked that. Could be caching on their end.
6 months ago
well, I see port is ok, I call
http://be-gymadmin-production.up.railway.app:8080/api/customer/create
@RequestMapping("/api/customer")
@PostMapping("/create")
locally all works
http://localhost:8080/api/customer/create
I also check my second app and I found out that I also can not call it.
Now it looks like CORS thing.
If there was no change on the Railway side, it will be with my provider, I will let you know if the problem persists, thanks for now
6 months ago
What you're trying to do here is you're trying to use the public domain without the correct structure necassery for it to function. The public domain works via https, you can't use it via http. The other problem is that if you were to use the public domain- it wouldn't be reachable at 8080 because Railway services are only exposed on port 448 for public facing domains.
You need to use: https://be-gymadmin-production.up.railway.app/api/customer/create instead, that way you're using https which defaults to port 448.
If you're trying to use a private domain instead then you can use the private domain from within the service settings, it'd look something like http://something.railway.internal, although for your use-case you lkely don't want this since from what I could gather you're trying to reach this endpoint from your frontend and the private domain is only usable in the backend.
CORS issues are just a configurations you need to fix in your server
6 months ago
oh yes, thank you very much for help, very appreciate, problem is solved :)
Status changed to Solved dev • 6 months ago

