mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-14 08:15:02 -05:00
[httpd] Add "max-age=0" to Cache-Control header to force browsers to
always revalidate cached content
This commit is contained in:
parent
91ec155ecd
commit
d29f56f3eb
@ -301,7 +301,7 @@ httpd_request_etag_matches(struct evhttp_request *req, const char *etag)
|
||||
|
||||
// Add cache headers to allow client side caching
|
||||
output_headers = evhttp_request_get_output_headers(req);
|
||||
evhttp_add_header(output_headers, "Cache-Control", "private no-cache");
|
||||
evhttp_add_header(output_headers, "Cache-Control", "private,no-cache,max-age=0");
|
||||
evhttp_add_header(output_headers, "ETag", etag);
|
||||
|
||||
return false;
|
||||
@ -338,7 +338,7 @@ httpd_request_not_modified_since(struct evhttp_request *req, time_t mtime)
|
||||
|
||||
// Add cache headers to allow client side caching
|
||||
output_headers = evhttp_request_get_output_headers(req);
|
||||
evhttp_add_header(output_headers, "Cache-Control", "private no-cache");
|
||||
evhttp_add_header(output_headers, "Cache-Control", "private,no-cache,max-age=0");
|
||||
evhttp_add_header(output_headers, "Last-Modified", last_modified);
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user