What I had in mind is a reverse proxy, built on top of iocaine, and extending its configuration.
Something like this:
acme {
// acme/LE configuration here
}
iocaine {
declare-handler nam-shub path=".../nam-shub-of-enki" {
inherits "default"
}
}
https-server main {
bind "0.0.0.0:443" http http2
use iocaine-handler=nam-shub
host "iocaine.madhouse-project.org" {
use middleware="iocaine.madhouse-project.org"
upstream "10.69.0.42:8096"
}
middleware "iocaine.madhouse-project.org" script-path="..." {
// middleware configuration
}
}
The "middleware" would be a Roto script with two functions: request_transform and response_transform. Requests & responses would be mutated by Roto, as the script sees fit.
The reason I'd use Roto here is that I'm doing a lot of rewrites and redirs, and I feel those would be easier to express in a programming language, rather than trying to do it declaratively in bespoke syntax.
My gut feeling is that using Roto here would also make it more efficient than evaluating expressions through something like CEL.