-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
42 lines (32 loc) · 1010 Bytes
/
nginx.conf
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
events {}
http {
include /etc/nginx/mime.types;
sendfile on;
server {
listen 80;
listen [::]:80;
server_name ciplatform;
root /usr/share/nginx/html;
location / {
add_header Access-Control-Allow-Origin *;
expires 1M;
access_log off;
add_header Cache-Control "public";
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html;
}
location ~* .(js|css|ttf|ttc|otf|eot|woff|woff2)$ {
add_header Access-Control-Allow-Origin "*";
expires max;
}
location ~* \.(eot|ttf|woff|woff2|svg)$ {
add_header Access-Control-Allow-Origin *;
}
location ~ \.(js|css|png|jpg|jpeg|gif|ico|html|woff|woff2|ttf|svg|eot|otf)$ {
add_header "Access-Control-Allow-Origin" "*";
expires 1M;
access_log off;
add_header Cache-Control "public";
}
}
}