Added cache-control to image-server

This commit is contained in:
Mawoka
2022-04-01 18:42:35 +02:00
parent b3a54ce4f5
commit e39898acdf
+2 -1
View File
@@ -18,4 +18,5 @@ async def download_file(file_name: str):
def iter_file():
yield from download
return StreamingResponse(iter_file(), media_type='image/*')
return StreamingResponse(iter_file(), media_type='image/*',
headers={"Cache-Control": "public, immutable, max-age=31536000"})