add date expire to cache.
This commit is contained in:
parent
4f2fef9375
commit
7ceb1311c5
@ -40,6 +40,8 @@ Live2dBackend::Live2dBackend() {
|
|||||||
res.set(http::field::server, BOOST_BEAST_VERSION_STRING);
|
res.set(http::field::server, BOOST_BEAST_VERSION_STRING);
|
||||||
res.set(http::field::content_type, ResponseUtility::mimeType(path));
|
res.set(http::field::content_type, ResponseUtility::mimeType(path));
|
||||||
// res.set(http::field::access_control_allow_origin, "*");
|
// res.set(http::field::access_control_allow_origin, "*");
|
||||||
|
res.set(http::field::cache_control, "max-age=2592000");
|
||||||
|
res.set(http::field::expires, "Fri, 22 Nov 2124 13:30:28 GMT");
|
||||||
res.content_length(size);
|
res.content_length(size);
|
||||||
res.keep_alive(request.keep_alive());
|
res.keep_alive(request.keep_alive());
|
||||||
session.reply(std::move(res));
|
session.reply(std::move(res));
|
||||||
|
Loading…
Reference in New Issue
Block a user