]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/WwwStatic.pm
wwwstatic: set "Vary: Accept-Encoding" in static gzip response
[public-inbox.git] / lib / PublicInbox / WwwStatic.pm
index 547b75bba01c369d7caa75a07ac3ed1fcac9d28b..3c933156405bedb92db5afee4a3beed6a29506bc 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2019 all contributors <meta@public-inbox.org>
+# Copyright (C) 2016-2020 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # This package can either be a PSGI response body for a static file
@@ -117,7 +117,9 @@ sub try_gzip_static ($$$$) {
        return unless -f $gz && (stat(_))[9] == $mtime;
        my $res = response($env, $h, $gz, $type);
        return if ($res->[0] > 300 || $res->[0] < 200);
-       push @{$res->[1]}, qw(Cache-Control no-transform Content-Encoding gzip);
+       push @{$res->[1]}, qw(Cache-Control no-transform
+                               Content-Encoding gzip
+                               Vary Accept-Encoding);
        $res;
 }