mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 11:26:56 -08:00
update Vary header to account for language
This commit is contained in:
parent
fed38857f8
commit
7e67f67ca6
2 changed files with 3 additions and 3 deletions
|
@ -224,7 +224,7 @@ def show_post(post_id: int):
|
|||
joined_communities=joined_communities(current_user.get_id()),
|
||||
inoculation=inoculation[randint(0, len(inoculation) - 1)]
|
||||
)
|
||||
response.headers.set('Vary', 'Accept, Cookie')
|
||||
response.headers.set('Vary', 'Accept, Cookie, Accept-Language')
|
||||
return response
|
||||
|
||||
|
||||
|
@ -416,7 +416,7 @@ def continue_discussion(post_id, comment_id):
|
|||
moderating_communities=moderating_communities(current_user.get_id()),
|
||||
joined_communities=joined_communities(current_user.get_id()), community=post.community,
|
||||
inoculation=inoculation[randint(0, len(inoculation) - 1)])
|
||||
response.headers.set('Vary', 'Accept, Cookie')
|
||||
response.headers.set('Vary', 'Accept, Cookie, Accept-Language')
|
||||
return response
|
||||
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ def return_304(etag, content_type=None):
|
|||
resp = make_response('', 304)
|
||||
resp.headers.add_header('ETag', request.headers['If-None-Match'])
|
||||
resp.headers.add_header('Cache-Control', 'no-cache, max-age=600, must-revalidate')
|
||||
resp.headers.add_header('Vary', 'Accept, Cookie')
|
||||
resp.headers.add_header('Vary', 'Accept, Cookie, Accept-Language')
|
||||
if content_type:
|
||||
resp.headers.set('Content-Type', content_type)
|
||||
return resp
|
||||
|
|
Loading…
Reference in a new issue