Remove path prefix on reverse_proxy

1. Caddy version (caddy version):


2. How I run Caddy:

caddy start

a. System environment:

debian OS

d. My complete Caddyfile or JSON config: {
 reverse_proxy /api/*  localhost:9000

3. The problem I’m having:

I want to remove the path api from uri
A call to will need to proxy to localhost:9000/__health
currently it hits localhost:9000/api/__health

You can use handle_path for this:

handle_path /api/* {
	reverse_proxy localhost:9000

This topic was automatically closed after 30 days. New replies are no longer allowed.