Skip to content

Commit

Permalink
Merge pull request #16 from seatable/update-max-age
Browse files Browse the repository at this point in the history
update max-age
  • Loading branch information
freeplant authored Dec 14, 2021
2 parents 3eb6050 + 316fb58 commit c981d45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions docker/scripts/enterpoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ fi
# logrotate
if [[ -f /var/spool/cron/crontabs/root ]]; then
cat /scripts/logrotate-conf/logrotate-cron >> /var/spool/cron/crontabs/root
/usr/bin/crontab /var/spool/cron/crontabs/root
else
chmod 0644 /scripts/logrotate-conf/logrotate-cron
/usr/bin/crontab /scripts/logrotate-conf/logrotate-cron
Expand Down
4 changes: 2 additions & 2 deletions seatable_thumbnail/http_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def gen_thumbnail_response(thumbnail, etag, last_modified):

# cache
if thumbnail:
response_start['headers'].append([b'Cache-Control', b'max-age=86400, public'])
response_start['headers'].append([b'Cache-Control', b'max-age=604800, public'])
response_start['headers'].append([b'ETag', etag.encode('utf-8')])
response_start['headers'].append([b'Last-Modified', last_modified.encode('utf-8')])

Expand All @@ -59,7 +59,7 @@ def gen_plugin_response(plugin, content_type, etag, last_modified):

# cache
if plugin:
response_start['headers'].append([b'Cache-Control', b'max-age=86400, public'])
response_start['headers'].append([b'Cache-Control', b'max-age=31536000, public'])
response_start['headers'].append([b'ETag', etag.encode('utf-8')])
response_start['headers'].append([b'Last-Modified', last_modified.encode('utf-8')])

Expand Down

0 comments on commit c981d45

Please sign in to comment.