From 0db526a2d684e1c8bec177eae2bfe0363bffcd7a Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Mon, 19 Dec 2022 13:14:53 +0100 Subject: [PATCH] added timestamp to download filename --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 6da9c66..ea9de3c 100644 --- a/app/main.py +++ b/app/main.py @@ -85,7 +85,7 @@ async def client_token(): data = jwt.encode(payload, key=key, headers=None, algorithm='RS256') response = StreamingResponse(iter([data]), media_type="text/plain") - response.headers["Content-Disposition"] = "attachment; filename=client_token.tok" + response.headers["Content-Disposition"] = f'attachment; filename=client_configuration_token_{datetime.now().strftime("%d-%m-%y-%H-%M-%S")}' return response