URLs from request object are http instead of https
Hi, I'm using adonisjs and checking request object to get the url called by the user. URL got from this request object contains http://xxx.up.railway.app/login but user is on https://xxx.up.railway.app and the HTTP request is in https.
Deployment method is docker
16 Replies
Project ID:
9c4619f9-e594-4de9-90e3-8bf2b917df73
9c4619f9-e594-4de9-90e3-8bf2b917df73
your service would see the request as http, that is normal
Because of a reverse proxy?
correct
I don't have this kind of problem elsewhere, like with a server with caddy
i dont quite see the problem though?
I would have hoped if a request is send to https://service.com, the request.url would be https://service.com and not http://service.com
can you maybe tell me how that would cause issues?
i just cant imagine how that would cause a problem
User sign an object client side containing the url he will call later
This object contains https://. On the backend, I have to verify if the request url and url contained in the signed object match
Solution
it's completely safe to assume https when running on railway
Yes that's what I will do
I do not have other option π
the proxy makes the request to your app with http, its just how it works
I understand
Thank you π
no problem π
Bye