mirror of
https://github.com/esphome/esphome.git
synced 2024-11-12 18:27:46 +01:00
Let favicon be cached (#3729)
This commit is contained in:
parent
fc15ddfa91
commit
a47e92f2bc
1 changed files with 6 additions and 3 deletions
|
@ -947,9 +947,12 @@ def make_app(debug=get_bool_env(ENV_DEV)):
|
|||
|
||||
class StaticFileHandler(tornado.web.StaticFileHandler):
|
||||
def set_extra_headers(self, path):
|
||||
self.set_header(
|
||||
"Cache-Control", "no-store, no-cache, must-revalidate, max-age=0"
|
||||
)
|
||||
if "favicon.ico" in path:
|
||||
self.set_header("Cache-Control", "max-age=84600, public")
|
||||
else:
|
||||
self.set_header(
|
||||
"Cache-Control", "no-store, no-cache, must-revalidate, max-age=0"
|
||||
)
|
||||
|
||||
app_settings = {
|
||||
"debug": debug,
|
||||
|
|
Loading…
Reference in a new issue