deploying springboot backend but no HTTPS public link
orangeuaswe
FREEOP

a year 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?

Closed$10 Bounty

28 Replies

a year ago

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


a year 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)


a year ago

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


orangeuaswe
FREEOP

a year ago

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


a year ago

Perfect


orangeuaswe
FREEOP

a year ago

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


a year ago

Vercel's nameservers?


orangeuaswe
FREEOP

a year ago

netlify


a year ago

I would just use Cloudflare here


a year ago

I didn't even know Netlify had nameservers


orangeuaswe
FREEOP

a year ago

i just made a cloudflare account


orangeuaswe
FREEOP

a year ago

would it be easier to just host it on there?


orangeuaswe
FREEOP

a year ago

there's not much its doing


a year ago

The domain? Yes.


orangeuaswe
FREEOP

a year ago

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


a year ago

Hoorah


orangeuaswe
FREEOP

a year ago

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


a year ago

Yeah


a year ago

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


a year ago

It'll instruct you


a year ago

Then on your frontend you can call backend.x


orangeuaswe
FREEOP

a year ago

gotcha


orangeuaswe
FREEOP

a year ago

waiting on the dns to update


orangeuaswe
FREEOP

a year ago

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


a year ago

It should be yes 😁


a year ago

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


a year ago

Yerp! Should be basically instant with Cloudflare as well.


a year ago

@oncle97 Did you get this working?


Welcome!

Sign in to your Railway account to join the conversation.

Loading...