forked from maksrom/javascript-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjavascript-static
More file actions
executable file
·45 lines (37 loc) · 849 Bytes
/
javascript-static
File metadata and controls
executable file
·45 lines (37 loc) · 849 Bytes
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
43
44
45
#
# !!! No add_header directives here
# otherwise they won't be inherited from the outer context
index index.html;
# If no favicon exists return a 204 (no content).
location = /favicon.ico {
try_files $uri =204;
log_not_found off;
access_log off;
expires 10d;
}
# Don't log robots.txt requests.
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
expires 10d;
}
location ~ /\. { # above all
deny all;
}
# strip .v12345 from all files and restart match
location ~ \.v.*?\. {
rewrite ^(.*?)(\.v.*?)(\..+)$ $1$3 last;
}
location ~ \.mp4$ {
mp4;
mp4_buffer_size 1m;
mp4_max_buffer_size 5m;
}
# anything with an extension in basename
location ~ \.\w+$ {
access_log off;
expires 10d;
add_header Cache-Control public;
include "partial/args-cache-speed";
}