We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e4f620d commit e3a38efCopy full SHA for e3a38ef
api/main.py
@@ -36,8 +36,8 @@ def dicthash(data: dict) -> str:
36
37
def make_file_path(dh: str, request_url: URL) -> str:
38
"""Build a file path from dict_hash and a URL."""
39
- fqdn = str(request_url).removesuffix(request_url.path)
40
- return f"{fqdn}/static/{dh}.png"
+ path = f"/static/{dh}.png"
+ return str(request_url.replace(query="", path=path))
41
42
43
@app.get("/duck", status_code=201)
0 commit comments