Custom hostnames on Cloudflare pointing to app
markitosgv
HOBBYOP

2 years ago

We are currently using the cloudflare service for our customers who have their own domain pointing to our SAAS, the customers point to cloudflare where the valid SSL certificate is generated, and from cloudflare attacks the application on railway.

The problem is how from cloudflare can reach railway in a (Full) way that is to say by https between servers and that the certificate in railway is self-signed.

Is there any way to achieve this without having to configure the domains in railway? In fly.io it is possible to set this so that any domain that points resolves with a signed certificate.

[http_service.tls_options]

alpn = ["h2", "http/1.1"]

versions = ["TLSv1.2", "TLSv1.3"]

default_self_signed = true

6 Replies

2 years ago

I would recommend looking into using a Cloudflare tunnel.


markitosgv
HOBBYOP

2 years ago

Thanks but is not what I need


2 years ago

I don't see why not -

Is there any way to achieve this without having to configure the domains in railway?

A Cloudflare Tunnel.


ramezj
HOBBY

2 years ago

Hello, did you guys figure this issue out? I'm facing the same issue.


thegarty
PRO

10 months ago

Did this ever get resolved, I'm having the same exact issue


wolfiee42
FREE

2 months ago

there are 2 ways to resolve this issue.

1. cloudflare worker, simplest solution. create a cloudflare worker which will add HOST and the required fields in header for you to resolve this issue.

as worker offers 100k http request per day in free tier, it is actually becomes expensive if your applciation is big.

2. a reverse proxy hosted in VPS, which will do exactly what cloudflare worker does.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...