Merge pull request #1218 from bbappserver/patch-5

Short Cache-Control header for dynamic pages
This commit is contained in:
Hydrus Network Developer 2022-09-03 15:04:25 -05:00 committed by GitHub
commit bfd63bfe5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -675,6 +675,7 @@ class HydrusResource( Resource ):
request.setHeader( 'Content-Type', content_type )
request.setHeader( 'Content-Length', str( content_length ) )
request.setHeader( 'Content-Disposition', content_disposition )
request.setHeader( 'Cache-Control', 'max-age={}'.format( 4 ) ) #hydurs won't change its mind about dynamic data under 4 seconds even if you ask repeatedly
request.write( body_bytes )