mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 21:44:55 +01:00
Allow static assets to be cached if not in debug mode (#5684)
This commit is contained in:
parent
fce59819f5
commit
43b36ac3c7
1 changed files with 5 additions and 3 deletions
|
@ -1328,9 +1328,11 @@ def make_app(debug=get_bool_env(ENV_DEV)):
|
||||||
if "favicon.ico" in path:
|
if "favicon.ico" in path:
|
||||||
self.set_header("Cache-Control", "max-age=84600, public")
|
self.set_header("Cache-Control", "max-age=84600, public")
|
||||||
else:
|
else:
|
||||||
self.set_header(
|
if debug:
|
||||||
"Cache-Control", "no-store, no-cache, must-revalidate, max-age=0"
|
self.set_header(
|
||||||
)
|
"Cache-Control",
|
||||||
|
"no-store, no-cache, must-revalidate, max-age=0",
|
||||||
|
)
|
||||||
|
|
||||||
app_settings = {
|
app_settings = {
|
||||||
"debug": debug,
|
"debug": debug,
|
||||||
|
|
Loading…
Reference in a new issue