forked from lecepin/gen-brand-photo-pictrue
-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathnginx.conf
More file actions
22 lines (18 loc) · 664 Bytes
/
Copy pathnginx.conf
File metadata and controls
22 lines (18 loc) · 664 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
add_header Access-Control-Allow-Headers 'Origin, X-Requested-With, Content-Type, Accept';
}
location ~* \.(?:ico|css|js|woff|woff2|ttf|otf|eot|svg|jpg|jpeg|png|gif|webp|avif|mp4|webm|ogv|ogg|mp3|m4a|wav|flac)$ {
expires 6M;
access_log off;
add_header Cache-Control "public, max-age=15768000, immutable";
}
error_page 404 /index.html;
}