Reverse proxy hide port in uri

Hello!
I’m having a hard time finding information about whether it’s possible to hide proxy in URI after reverse proxy.
I’m using Caddy latest docker release.

Caddyfile (sorry, but I’ll replace my domain to example.com since infrastructure is not yet fully secure):

dc.example.com {
    reverse_proxy 192.168.1.101:88
}

Scenario:
I enter dc.example.com and get back dc.example.com:444/main
Can I somehow specify in Caddyfile to remove the port from the URI? I saw the documentation about uri manipulations , but didn’t succeeded to remove the port from URI.
Could anyone provide an example, if it’s possible? :slight_smile:
Thanks a lot~

Please fill out the help topic template.

What version of Caddy are you using? What’s in your logs? Use curl -v to make a request, to show what the response headers look like.

It sounds like your backend app is performing a redirect. This isn’t a problem with Caddy, but likely a misconfiguration of your upstream app.

3 Likes

Hi.
Ah yes, it’s being redirected from 88 to 444 by app (http to https). Looks like I’m legally blind :clown_face:
Thanks for pointing the obvious.

1 Like