shed219 commited on
Commit
dbb4c4d
·
1 Parent(s): 1c6307e

Update nginx.conf

Browse files
Files changed (1) hide show
  1. nginx.conf +25 -9
nginx.conf CHANGED
@@ -3,15 +3,31 @@ server {
3
 
4
  server_name _;
5
 
6
- location / {
7
- proxy_pass https://cloudphoneh5.buy.139.com/;
8
- proxy_set_header X-Real-IP $remote_addr;
9
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
10
- proxy_set_header REMOTE-HOST $remote_addr;
11
- proxy_set_header Upgrade $http_upgrade;
12
- proxy_set_header Connection $connection_upgrade;
13
- proxy_set_header Host cloudphoneh5.buy.139.com;
14
- proxy_hide_header X-Frame-Options;
 
 
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  }
17
  }
 
3
 
4
  server_name _;
5
 
6
+ location ^~ /
7
+ {
8
+ proxy_pass https://cloudphoneh5.buy.139.com/;
9
+ proxy_set_header Host cloudphoneh5.buy.139.com;
10
+ proxy_set_header X-Real-IP $remote_addr;
11
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
12
+ proxy_set_header REMOTE-HOST $remote_addr;
13
+ proxy_set_header Upgrade $http_upgrade;
14
+ proxy_set_header Connection $connection_upgrade;
15
+ proxy_http_version 1.1;
16
+ # proxy_hide_header Upgrade;
17
 
18
+ add_header X-Cache $upstream_cache_status;
19
+
20
+ #Set Nginx Cache
21
+
22
+
23
+ set $static_filezSQpJEkr 0;
24
+ if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
25
+ {
26
+ set $static_filezSQpJEkr 1;
27
+ expires 1m;
28
+ }
29
+ if ( $static_filezSQpJEkr = 0 )
30
+ {
31
+ add_header Cache-Control no-cache;
32
  }
33
  }