Kvarn’s reverse proxy implementation allows pass through of web servers’ responses.
On the git version of Kvarn, URL rewrite is implemented, and automatically applied.
It can for instance pass all requests under /api/*
to a backend server. It caches according to the cache-control
and kvarn-cache-control
headers. /api/search?q=icelk
becomes a request to /search?q=icelk
on the backend server.
This implementation is used by me for proxying my self-hosted Bitwarden vault (using Vaultwarden, of course) to the internet.
Usage
You start with constructing a manager. I recommend using static_connection
and localhost
and the Manager::base
constructor.
Consider Manager::new
for more control.
Then, mount it to your extensions using Manager::mount
.