URL confusion caused by Caddyfile configuration

1. The problem I’m having:

I’m trying to correctly setup an steam openid login implementation but after putting the realm as my domain and the returnUrl as the domain/callback, not localhost it is apparently putting https://https://arenadota.com/callback Why is it doing that? Is it something in my Caddyfile causing that confusion?

For context, the implementation for these two variables are:

this.steamAuth = new SteamAuth({
      realm: `https://arenadota.com`,
      returnUrl: `https://arenadota.com/callback`,
      apiKey: process.env.STEAM_WEB_API_KEY,
    });

2. Error messages and/or full log output:

There are no error messages, thankfully, just that url mixup that is popping up

3. Caddy version:

Caddy v2.9.1

4. How I installed and ran Caddy:

Followed the installation guide for the stable version of caddy for Ubuntu.

a. System environment:

Ubuntu 24.04.2 LTS server

b. Command:

sudo systemctl start caddy

d. My complete Caddy config:

arenadota.com {
        reverse_proxy localhost:5173

        # Set this path to your site's directory.
        # root * /web/frontend/dist

        # Enable the static file server.
        # file_server

        reverse_proxy /callback* localhost:8081
        reverse_proxy /health-check localhost:8081
        reverse_proxy /steam_auth localhost:8081
        reverse_proxy /api/v1* localhost:8081
        # TODO: Bot
}

5. Links to relevant resources:

I’m not using the passport steam strategy, instead, I used the node-steam-openid library since it was easier to implement and didn’t require extensive documentation.

It’s not Caddy doing it. Caddy is not the one creating the URLs, so it cannot be the one doing it.