How do I configure reverse proxy with Heroku

I don’t use Heroku, so I couldn’t say. You also haven’t said what kind of app you’re trying to serve with Caddy.

These lines are not necessary. Caddy sets the appropriate headers automatically, see in the docs:

Also in Caddy v2, the option is called header_up, not header_upstream. You probably found instructions for Caddy v1. Caddy v2 is a complete rewrite and is fundamentally quite different.

This doesn’t really make sense. You can’t proxy to the same domain that you’re serving, otherwise you’ll just end up in an infinite loop.

Have you installed Caddy?

1 Like