deploying springboot backend but no HTTPS public link
orangeuaswe
FREEOP

10 months ago

hi there, im a bit new to deploying on services like railway, and im trying to deploy a springboot backend on railway, and it does work, but the issue is with cross-origins. my frontend is a https site, whereas the public link we get with railway is an http link. is there any way to remedy this, or am i SOL?

$10 Bounty

28 Replies

10 months ago

The public link should not be an HTTP link. What button are you pressing to generate it?


10 months ago

If you own a domain you should use that for both the frontend and backend, with the backend having a subdomain. (For example backend.example.com)


10 months ago

If not then you can press the generate domain button and that will give you a usable HTTPS link


orangeuaswe
FREEOP

10 months ago

i do have a domain i own, and i'm currently hosting my frontend on netlify


10 months ago

Perfect


orangeuaswe
FREEOP

10 months ago

i bought the domain from namecheap, and i'm using their nameservers instead of namecheaps


10 months ago

Vercel's nameservers?


orangeuaswe
FREEOP

10 months ago

netlify


10 months ago

I would just use Cloudflare here


10 months ago

I didn't even know Netlify had nameservers


orangeuaswe
FREEOP

10 months ago

i just made a cloudflare account


orangeuaswe
FREEOP

10 months ago

would it be easier to just host it on there?


orangeuaswe
FREEOP

10 months ago

there's not much its doing


10 months ago

The domain? Yes.


orangeuaswe
FREEOP

10 months ago

ok so i was able to host my domain on cloudflare, just waiting on it to change nameservers and stuff


10 months ago

Hoorah


orangeuaswe
FREEOP

10 months ago

so i setup subdomains on cloudflare, and then link it to railway?


10 months ago

Yeah


10 months ago

Go into the backend's service settings and use backend.example.com


10 months ago

It'll instruct you


10 months ago

Then on your frontend you can call backend.x


orangeuaswe
FREEOP

10 months ago

gotcha


orangeuaswe
FREEOP

10 months ago

waiting on the dns to update


orangeuaswe
FREEOP

10 months ago

so once its all done, its up and ready to go?


10 months ago

It should be yes 😁


10 months ago

The name servers might take a few hours to update but over all it'll work!


10 months ago

Yerp! Should be basically instant with Cloudflare as well.


10 months ago

@oncle97 Did you get this working?


Welcome!

Sign in to your Railway account to join the conversation.

Loading...