Compulsory trailing slashes with Caddy and gunicorn + flask

Here is what I use for gunicorn:

root /home/web/website/

header / -Server

rewrite {
    to /public/{path}
}

proxy /public unix:/home/web/gunicorn.sock {
    except /static
    without /public
    transparent
}


log stdout

It’s the slightly awkward equivilent of try_files then proxy.