Repository navigation
Expand file tree
/
Copy pathnginx.conf
More file actions
65 lines (54 loc) · 1.77 KB
/
Copy pathnginx.conf
File metadata and controls
65 lines (54 loc) · 1.77 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
# Stock mime.types has no .md mapping, so SKILL.md / page twins
# would otherwise be application/octet-stream (WebFetch 500s).
types {
text/markdown md markdown;
}
default_type application/octet-stream;
root /usr/share/nginx/html;
sendfile on;
tcp_nopush on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
charset utf-8;
location /demo/ {
index index.html;
try_files $uri $uri.html $uri/index.html =404;
add_header Cache-Control 'public, max-age=3600, s-maxage=60';
}
location / {
index index.html;
try_files $uri $uri/index.html =404;
add_header Cache-Control 'public, max-age=3600, s-maxage=60';
}
# Official seed for `vuetify add` + playground short links (cross-origin GET).
location /registry/ {
default_type application/json;
add_header Access-Control-Allow-Origin '*';
add_header Access-Control-Allow-Methods 'GET, OPTIONS';
add_header Access-Control-Allow-Headers 'Content-Type';
add_header Cache-Control 'public, max-age=300, s-maxage=60';
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin '*';
add_header Access-Control-Allow-Methods 'GET, OPTIONS';
add_header Access-Control-Allow-Headers 'Content-Type';
add_header Content-Length 0;
add_header Content-Type text/plain;
return 204;
}
try_files $uri =404;
}
location /assets/ {
add_header Cache-Control 'public, immutable, max-age=31536000, stale-if-error=604800';
}
error_page 404 /404/index.html;
#error_page 500 502 503 504 /50x.html;
}
}