Unable to reverse proxy traffic from Caddy (Docker) to Host Machine (Code-Server as Systemd)

Yes, use host.docker.internal to point to the host (instead of an IP address). Google it.

The docker host IP is not guaranteed to stay the same, so that hostname is provided to make it work.

Keep in mind that you don’t have any routes for anything other than /code* so you’ll get empty responses instead.

In general, I recommend using subdomains instead of subpaths. So I’d suggest making a code.pancakepuncher.com subdomain for this.

See this article which explains: