aboutsummaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authoraltaf-creator <dev@altafcreator.com>2026-09-20 00:43:20 +0800
committeraltaf-creator <dev@altafcreator.com>2026-09-20 00:43:20 +0800
commit849c988d2d416195145b0f6a49398cc283655568 (patch)
treea53aa5c6a24ef819fe0fed4b2d7dffe2ce6ca6d1 /main.py
parent4d20eebc026c2249dfe74497261cf2b1eb81abed (diff)
allow HEAD requests
Diffstat (limited to 'main.py')
-rw-r--r--main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.py b/main.py
index 4669819..2c88f5e 100644
--- a/main.py
+++ b/main.py
@@ -57,7 +57,7 @@ async def force_trailing_slash(request: fastapi.Request, call_next):
return response
-@app.get("/{path:path}")
+@app.api_route("/{path:path}", methods=["GET", "HEAD"])
def folder(path: str):
target_path = (FOLDER_PATH / path).resolve()