-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
101 lines (80 loc) · 2.73 KB
/
Copy pathnginx.conf
File metadata and controls
101 lines (80 loc) · 2.73 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
load_module /usr/lib/nginx/modules/ngx_http_brotli_filter_module.so;
load_module /usr/lib/nginx/modules/ngx_http_brotli_static_module.so;
worker_processes auto;
worker_cpu_affinity auto;
events {}
pid /tmp/nginx.pid;
http {
include mime.types;
types {
application/manifest+json webmanifest;
}
sendfile on;
tcp_nopush on;
brotli on;
brotli_comp_level 6;
brotli_static on;
brotli_types
text/plain
text/css
text/javascript
text/xml
application/javascript
application/json
application/manifest+json
image/svg+xml
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_min_length 1024;
gzip_types $brotli_types;
server {
listen 3000;
listen [::]:3000;
server_name bybe.app;
root /usr/share/nginx/html;
index index.html;
access_log off;
error_log /tmp/nginx-error.log error;
location = /index.html {
internal;
charset utf-8;
add_header Cache-Control "no-cache";
include nginx_headers.conf;
}
location ~* \.(?:xml|webmanifest)$ {
charset utf-8;
add_header Cache-Control "max-age=3600, public";
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
}
location ~* \.(?:css|js)$ {
charset utf-8;
add_header Cache-Control "max-age=31536000, public, immutable";
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
}
location ~* \.(?:svg|woff2|png|webp|ico)$ {
add_header Cache-Control "max-age=31536000, public, immutable";
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
}
location / {
try_files $uri /index.html;
include nginx_headers.conf;
}
location = /robots.txt {
access_log off;
log_not_found off;
add_header X-Content-Type-Options "nosniff" always;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
}
location ~ /\.(?!well-known).* {
deny all;
}
}
}