sozu-proxy / sozu

Sōzu HTTP reverse proxy, configurable at runtime, fast and safe, built in Rust. It is awesome!
https://www.sozu.io/
GNU Affero General Public License v3.0
3.01k stars 187 forks source link

Dynamic automatic answers system #1080

Closed Wonshtrum closed 6 months ago

Wonshtrum commented 7 months ago

Make all automatic answers configurable. The goal is to be able to provide an HTML-like file for each automatic answer generated by Sozu. The format allows some templating to generate dynamic responses. The format is parsed from Http/1.1 to our Kawa intermediate format only once and at the start of a worker. Parsing resolves all templating variables and generates a trivial in-place replacement strategy. Filling a template should be as performant as possible.

Keksoj commented 7 months ago

TODO:

Keksoj commented 6 months ago

It would be meaningfull to add a CLUSTER_ID replaceable variable in the template, for errors 502, 503, 504 and 507.

Keksoj commented 6 months ago

providing cluster id as CLUSTER_ID where possible would be very nice too. So, to sum up:

Keksoj commented 6 months ago

wait, I messed up something when rebasing main