You should use handle
instead here, so that once you’ve stripped the path prefix, you don’t need to rely on a matcher afterwards for reverse_proxy
.
handle /app* {
uri /app/_next* strip_prefix /app
reverse_proxy {$ELB_HOST} {
header_up +codomain {host}
header_up +service admin-ui
}
}
Also if you use handle for one route, I recommend using it for all routes. It’s helpful to keep routes mutually exclusive (so if one is matched, other handle
are not run - use one without a matcher as a fallback)
Some additional reading: