diff --git a/matemat/__main__.py b/matemat/__main__.py index bcfd877..d3dd5e8 100644 --- a/matemat/__main__.py +++ b/matemat/__main__.py @@ -67,8 +67,9 @@ def get_thumbnail(resource: str, filename: str): static: str = os.path.abspath(config['staticroot']) rpath: str = os.path.join(static, 'upload/thumbnails', resource) resp = bottle.static_file(filename, root=rpath) - if resp.status_code != 200: + if resp.status_code >= 400: resp = bottle.static_file('default.png', root=rpath) + resp.headers['Cache-Control'] = 'public, max-age=0;' return resp diff --git a/templates/admin.html b/templates/admin.html index 2472676..6f53815 100644 --- a/templates/admin.html +++ b/templates/admin.html @@ -112,7 +112,7 @@