Support client-defined names in file URL routing

This allows requests like /j4Tf.bin/myfilename.dat to be served without
having to rewrite URLs at the frontend server.
master
Mia Herkt 3 years ago
parent 73045dc5e5
commit 3bdbab96c1
No known key found for this signature in database
GPG Key ID: 72E154B8622EC191

@ -270,7 +270,7 @@ def store_url(url, addr):
@app.route("/<path:path>")
def get(path):
path = Path(path)
path = Path(path.split("/", 1)[0])
sufs = "".join(path.suffixes[-2:])
name = path.name[:-len(sufs) or None]
id = su.debase(name)

Loading…
Cancel
Save