summaryrefslogtreecommitdiff
path: root/www/.htaccess
blob: b51816a32f82ee054eb1462d7c2af80fddcce52d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<IfModule mod_expires.c>
  ExpiresActive on
  ExpiresDefault "access plus 1 minutes"
  <Location "^/(dump|json)/">
    ExpiresDefault "access plus 1 years"
    <Location "^/dump/(bgm|sfx)">
      Header set X-Content-Duration "0"
    </Location>
  </Location>
</IfModule>

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{HTTP:Accept-Encoding} gzip
  RewriteCond %{REQUEST_FILENAME}\.gz -s
  RewriteRule ^(.*)\.json $1\.json\.gz [QSA]

# Prevent double gzip and give the correct mime-type
  RewriteRule \.json\.gz$ - [T=application/json,E=no-gzip:1,E=FORCE_GZIP]

  Header set Content-Encoding gzip env=FORCE_GZIP
</IfModule>

Header set Cache-Control "public"
Header set X-UA-Compatible "IE=edge,chrome=1"