forked from M-Labs/ionpak-thermostat
Add Cache-Control header for static assets.
This avoids wasting device cycles on retrieving the same data over and over.
This commit is contained in:
parent
2bdc483e15
commit
6ffb157cb8
|
@ -174,6 +174,7 @@ pub fn write_reply_header(output: &mut fmt::Write, status: u16, content_type: &s
|
||||||
status, status_text, content_type)?;
|
status, status_text, content_type)?;
|
||||||
if gzip {
|
if gzip {
|
||||||
write!(output, "Content-Encoding: gzip\r\n")?;
|
write!(output, "Content-Encoding: gzip\r\n")?;
|
||||||
|
write!(output, "Cache-Control: public, max-age=600\r\n")?;
|
||||||
}
|
}
|
||||||
write!(output, "\r\n")
|
write!(output, "\r\n")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue