ioi-germany / cms

Contest Management System
GNU Affero General Public License v3.0
13 stars 1 forks source link

Set no-cache flag and max-age=0 when serving a file #10

Closed magula closed 4 years ago

magula commented 4 years ago

Previously, a file served through FileServerMiddleware could be re-used by a client browser without asking the server whether there's a new version of the file. Now the client is told to always ask whether the file was changed instead of just using the cached file.

This is necessary, e.g. if the contest admins make changes to a task statement during the contest, so contestants won't still get served the previous version they've already downloaded because the browser assumes it's a persistent file.