matt
(Matt Holt)
May 27, 2020, 4:46pm
3
To prepend to the path, use rewrite instead:
rewrite * /some/path/on/upstream{uri}
@Northrop I wrote a very comprehensive wiki article about composing routes in the Caddyfile – it will answer your question! (As will the docs page for the route directive.)
Web server config files are mostly about expressing HTTP handling logic. Often, various handlers or middlewares need to be “composed” to form a cohesive HTTP handler that returns the desired responses.
Structurally, config files are basically limited to two dimensions: rows and columns (or, lines and tokens). Syntactically, a config file’s second dimension can expand into more dimensions or scopes when blocks are opened (which are usually represented by curly braces { } and/or indentation, simi…
1 Like