proxies: fix ETag handling for pkgdb json file

We maintain a static json file for gnome-software (and others) that
tells them when new releases are available. This file gets downloaded a
LOT. Right now because this file is spread out on all our proxies and
the default ETag uses MTime in it, they all return different ETag
values, making it impossible to use ETags to not have to re-download the
file. Setting it to use just Size and Digest for this file means all the
proxies will have the same ETag and gnome-software can see that and not
download the file over and over if it's not changed.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2021-10-19 14:42:58 -07:00 committed by kevin
parent a285532571
commit 3e9626416c

View file

@ -1 +1,9 @@
#
# Do not use MTime for the ETag here, because the mtime of the file
# on the different proxies makes them return different ETags
# Instead use Digest and Size to tell when the file has changed.
#
<Files pkgdb-gnome-software-collections.json>
FileETag Size Digest
</Files>
AliasMatch ^/pkgdb/api/collections/? /srv/web/pkgdb-gnome-software-collections.json