mirror of
https://git.0x0.st/mia/0x0.git
synced 2024-12-22 00:01:08 -05:00
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.
This commit is contained in:
parent
73045dc5e5
commit
3bdbab96c1
1 changed files with 1 additions and 1 deletions
2
fhost.py
2
fhost.py
|
@ -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…
Reference in a new issue