diff --git a/app/post/routes.py b/app/post/routes.py index a40a10cd..993400cb 100644 --- a/app/post/routes.py +++ b/app/post/routes.py @@ -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 diff --git a/app/utils.py b/app/utils.py index 47feb13c..1832d1b6 100644 --- a/app/utils.py +++ b/app/utils.py @@ -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