diff options
| author | Mia Herkt <mia@0x0.st> | 2020-12-29 14:39:56 +0100 |
|---|---|---|
| committer | Mia Herkt <mia@0x0.st> | 2021-05-23 19:13:51 +0200 |
| commit | 3bdbab96c10f5ad01cb46c2af3009564b7d27997 (patch) | |
| tree | 09c9fe0d1d6ab8d4d10495dd8ec02427e1933b77 | |
| parent | 73045dc5e563b6fcc41fc46e12ad54f70d3156d3 (diff) | |
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.
| -rwxr-xr-x | fhost.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |
