Direct HTTP without S Post request
poui
PROOP

2 months ago

Hii !

is it possible to receive an HTTP POST request without it turning into an HTTPS Request in railway ?

I am using an API that doesn't support HTTPS callback urls with certificate made after 2012 (Riot games API) so it doesn't even try to make send me the data.

When I tried to communicate with my endpoint with an HTTP request it transforms into a GET despite having POST in the request. I don't have that issue when i use HTTPS in the url

10 Replies

poui
PROOP

2 months ago

Invoke-WebRequest -Uri "http://preprodfdmo3z2k6.api.pocketcoach.gg/tournament/callback" -Method POST -ContentType "application/json" -Body $body

becomes a GET.

Invoke-WebRequest -Uri "https://preprodfdmo3z2k6.api.pocketcoach.gg/tournament/callback" -Method POST -ContentType "application/json" -Body $body

with an S in https remains a POST


2 months ago

Is setting up Cloudflare feasible for you?

You're encountering a Railway limitation, can't go around it with something infront unfortunately


poui
PROOP

2 months ago

I am not familiar with it but yes I can learn it


poui
PROOP

2 months ago

if you have a link to a ressource or just the name of the service in cloudflare i can use to solve this issue I would appreciate it


poui
PROOP

2 months ago

I am thinking about having something that accepts the HTTP POST request and transforms it into an HTTPS POST request so railway can process it and read the body


2 months ago

Here's what should work

  • You'll have to onboard your domain into Cloudflare, you can upload a zone file etc to keep your current DNS records, docs on how to do that
  • For the CNAME pointing to the service that you need HTTP on, you need to enable Cloudflare proxied and make a few rules Cloudflare may automatically rewrite HTTP into HTTPS, with the same limitation as Railway, you can disable this by creating a configuration rule (see screenshot 1) Then create a redirect rule with it configured something like screenshot 2, make sure that you select the 308 status code

image0.png

Screenshot_20260318-135111.png


2 months ago

Rules can be created from here in the sidebar

Screenshot_20260318-135237.png

Attachments


poui
PROOP

2 months ago

Thanks ! I will look into it now


2 months ago

Feel free to @ me if you're stuck with something


2 months ago

Listed 308 here, should use 307


Welcome!

Sign in to your Railway account to join the conversation.

Loading...