shed219 commited on
Commit
606b4e8
·
1 Parent(s): 4bca313

Update nginx.conf

Browse files
Files changed (1) hide show
  1. nginx.conf +30 -29
nginx.conf CHANGED
@@ -3,36 +3,37 @@ server {
3
 
4
  server_name _;
5
 
6
- location /
7
- {
8
- proxy_pass https://cloudphoneh5.buy.139.com/;
9
- proxy_set_header referer https://cloudphoneh5.buy.139.com/;
10
- proxy_set_header Origin https://cloudphoneh5.buy.139.com;
11
- proxy_set_header :authority: cloudphoneh5.buy.139.com;
12
- add_header X-Frame-Options SAMEORIGIN always;
13
- proxy_set_header Host cloudphoneh5.buy.139.com;
14
- proxy_set_header X-Real-IP $remote_addr;
15
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
16
- proxy_set_header REMOTE-HOST $remote_addr;
17
- proxy_set_header Upgrade $http_upgrade;
18
- proxy_http_version 1.1;
19
- # proxy_hide_header Upgrade;
20
 
21
- add_header X-Cache $upstream_cache_status;
22
- #Set Nginx Cache
 
 
 
 
 
 
 
 
 
 
 
23
 
24
- proxy_set_header Accept-Encoding "";
25
- sub_filter "/hw/cloudphone/" "/ulhw/cloudphone/";
26
- sub_filter_once off;
27
- set $static_fileA5bezwgr 0;
28
- if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
29
- {
30
- set $static_fileA5bezwgr 1;
31
- expires 1m;
32
- }
33
- if ( $static_fileA5bezwgr = 0 )
34
- {
35
- add_header Cache-Control no-cache;
 
 
 
 
36
  }
37
- }
38
  }
 
3
 
4
  server_name _;
5
 
6
+ rewrite ^/hw(.*) https://shed219-nginx.hf.space/ulhw/$1 permanent;
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
+ location / {
9
+ proxy_pass https://cloudphoneh5.buy.139.com/;
10
+ proxy_set_header referer https://cloudphoneh5.buy.139.com/;
11
+ proxy_set_header Origin https://cloudphoneh5.buy.139.com;
12
+ proxy_set_header :authority: cloudphoneh5.buy.139.com;
13
+ add_header X-Frame-Options SAMEORIGIN always;
14
+ proxy_set_header Host cloudphoneh5.buy.139.com;
15
+ proxy_set_header X-Real-IP $remote_addr;
16
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
17
+ proxy_set_header REMOTE-HOST $remote_addr;
18
+ proxy_set_header Upgrade $http_upgrade;
19
+ proxy_http_version 1.1;
20
+ # proxy_hide_header Upgrade;
21
 
22
+ add_header X-Cache $upstream_cache_status;
23
+ #Set Nginx Cache
24
+
25
+ proxy_set_header Accept-Encoding "";
26
+ sub_filter "/hw/cloudphone/" "/ulhw/cloudphone/";
27
+ sub_filter_once off;
28
+ set $static_fileA5bezwgr 0;
29
+ if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
30
+ {
31
+ set $static_fileA5bezwgr 1;
32
+ expires 1m;
33
+ }
34
+ if ( $static_fileA5bezwgr = 0 )
35
+ {
36
+ add_header Cache-Control no-cache;
37
+ }
38
  }
 
39
  }