]> git.ipfire.org Git - ipfire.org.git/commit
web: Improve caching of static content
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 26 Jun 2023 10:09:03 +0000 (10:09 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 26 Jun 2023 10:09:03 +0000 (10:09 +0000)
commit90199689a559b667ed8c81cbf0d7efcda387cc03
tree9013499982fa1de547df04efc7761f85f0ad93c7
parent85c977e2a0999037756672fd86894f449ad7a209
web: Improve caching of static content

We need to make sure that we don't let browsers cache anything when the
cookie changes (Vary: Cookie).

Furthermore, we want to make sure that public caches don't cache
anything when the content is sent to a logged in user (Cache-Control:
private).

Finally, we want to indicate to caches how long something can be cached
which we do with an additional Cache-Control header and Expires for
older clients.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/web/auth.py
src/web/base.py