Setting Cache-Control: for three types of content

At this point the ETag value for ZIM content is still generated from the
timestamp of the server start-up time.
This commit is contained in:
Veloman Yunkan
2022-10-09 16:28:58 +04:00
parent 5471819021
commit 190156e095
6 changed files with 39 additions and 15 deletions

View File

@ -35,7 +35,7 @@ struct Resource
ResourceKind kind;
const char* url;
bool etag_expected() const { return kind != DYNAMIC_CONTENT; }
bool etag_expected() const { return kind != STATIC_CONTENT; }
};
std::ostream& operator<<(std::ostream& out, const Resource& r)
@ -47,7 +47,7 @@ std::ostream& operator<<(std::ostream& out, const Resource& r)
typedef std::vector<Resource> ResourceCollection;
const ResourceCollection resources200Compressible{
{ STATIC_CONTENT, "/ROOT/" },
{ DYNAMIC_CONTENT, "/ROOT/" },
{ STATIC_CONTENT, "/ROOT/skin/autoComplete.min.js" },
{ STATIC_CONTENT, "/ROOT/skin/css/autoComplete.css" },