Skip to content

Commit

Permalink
Cache-Control
Browse files Browse the repository at this point in the history
  • Loading branch information
SkywalkerSpace committed Aug 28, 2020
1 parent d54493f commit 73d8830
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions seatable_thumbnail/http_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,9 @@ def gen_thumbnail_response(thumbnail):
thumbnail_start = gen_response_start(200, THUMBNAIL_CONTENT_TYPE)
thumbnail_body = gen_response_body(thumbnail)

# Cache-Control
if thumbnail:
thumbnail_start['headers'].append([b'cache-control', b'public'])
thumbnail_start['headers'].append([b'cache-control', b'max-age=86400'])

return thumbnail_start, thumbnail_body

0 comments on commit 73d8830

Please sign in to comment.