blaubaer
(Gregor Noczinski)
1
Hi!
Is there a possibility to use something like:
{foo:-{bar}}
Why? I want a fallback to {bar}
if there is no {foo}
.
Example
proxy /api my-api:80 {
transparent
websocket
without /api
header_upstream X-Forwarded-Path {>X-Forwarded-Path:-{path}}
}
References
https://logback.qos.ch/manual/configuration.html#defaultValuesForVariables
I don’t think there’s a way to do that, actually. You might have to request this feature at the Caddy Github.
I imagine this could be a relatively simple change to the httpserver replacer logic to allow this kind of fallback for an empty placeholder.
1 Like
blaubaer
(Gregor Noczinski)
3
1 Like
system
(system)
Closed
4
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.