summaryrefslogtreecommitdiff
path: root/nginx.inc.conf
blob: b795a1ca3f7b19761711ca598773c5cc405b73c1 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
location /json/ {
  expires 1y;
}

location /dump/ {
  expires 1y;
  location ~ ^/dump/(bgm|sfx)/ { add_header X-Content-Duration "0"; }
}

location ~ ^/(css/font|js/lib)/ {
  expires 1d;
}

location / {
  set $warned NO;
  if ($http_cookie ~ "warned") {
          set $warned YES;
  }
  if ($args ~ "warned") {
          set $warned YES;
  }
  if ($warned = NO) {
          return 307 /warn.html;
  }
}

location /setcookie.html {
  add_header Set-Cookie "warned=1; Expires=Tue, 19 Jan 2038 00:00:00 GMT; HttpOnly";
  return 301 /;
}

location /warn.html {
  break;
}

location /robots.txt {
  break;
}

expires 5s;
add_header Cache-Control public;
add_header X-UA-Compatible "IE=edge";