[jsonapi] Prevent browsers to cache playlist tracks

The tracks of a smart playlist might change between library rescans.
Allowing them to be cached based on the last rescan timestamp
("Last-Modified" header in the response) leads to potentially showing
incorrect track listing if a cached version is used. Thus the response
for playlist tracks should never be cached by the browser (this is
achieved with setting "Cache-Control" header to "no-store").
This commit is contained in:
chme
2020-08-29 12:40:49 +02:00
parent 39b14ff8d4
commit dd811e6c70
3 changed files with 21 additions and 2 deletions

View File

@@ -107,6 +107,9 @@ httpd_request_not_modified_since(struct evhttp_request *req, time_t mtime);
bool
httpd_request_etag_matches(struct evhttp_request *req, const char *etag);
void
httpd_response_not_cachable(struct evhttp_request *req);
/*
* Gzips an evbuffer
*