mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-13 16:13:32 +02:00
Disable caching for binary download (#3054)
This commit is contained in:
@@ -445,6 +445,7 @@ class DownloadBinaryRequestHandler(BaseHandler):
|
|||||||
|
|
||||||
self.set_header("Content-Type", "application/octet-stream")
|
self.set_header("Content-Type", "application/octet-stream")
|
||||||
self.set_header("Content-Disposition", f'attachment; filename="{filename}"')
|
self.set_header("Content-Disposition", f'attachment; filename="{filename}"')
|
||||||
|
self.set_header("Cache-Control", "no-cache")
|
||||||
if not Path(path).is_file():
|
if not Path(path).is_file():
|
||||||
self.send_error(404)
|
self.send_error(404)
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user