Spaces:
Running
Running
rogerxavier
commited on
Update nginx.conf
Browse files- nginx.conf +53 -16
nginx.conf
CHANGED
@@ -8,29 +8,66 @@ http {
|
|
8 |
server {
|
9 |
listen 7860;
|
10 |
server_name localhost;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
}
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
}
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
default_type application/vnd.android.package-archive; # 设置返回类型为 APK
|
29 |
-
add_header Content-Disposition 'attachment; filename=bit.apk'; # 强制下载
|
30 |
-
}
|
31 |
|
32 |
|
33 |
|
34 |
-
|
35 |
}
|
36 |
-
}
|
|
|
8 |
server {
|
9 |
listen 7860;
|
10 |
server_name localhost;
|
11 |
+
|
12 |
+
location ~ .*\.(json)?$ {
|
13 |
+
proxy_pass https://yande.re;
|
14 |
+
proxy_set_header Host yande.re;
|
15 |
+
proxy_set_header Referer "https://yande.re";
|
16 |
+
proxy_set_header X-Real-IP $remote_addr;
|
17 |
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
18 |
+
proxy_set_header REMOTE-HOST $remote_addr;
|
19 |
|
20 |
+
#Persistent connection related configuration
|
21 |
+
add_header X-Cache $upstream_cache_status;
|
22 |
+
#Set Nginx Cache
|
23 |
+
proxy_set_header Accept-Encoding "";
|
24 |
+
sub_filter_types *;
|
25 |
+
#test
|
26 |
+
sub_filter "https://files.yande.re/" "http://yande.re/files";
|
27 |
+
sub_filter "https://assets.yande.re/" "http://yande.re/assets";
|
28 |
+
#test
|
29 |
+
sub_filter_once off;
|
30 |
+
}
|
31 |
+
|
32 |
+
location /{
|
33 |
+
proxy_pass https://yande.re;
|
34 |
+
proxy_set_header Host yande.re;
|
35 |
+
proxy_set_header X-Real-IP $remote_addr;
|
36 |
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
37 |
+
proxy_set_header REMOTE-HOST $remote_addr;
|
38 |
+
#Persistent connection related configuration
|
39 |
+
add_header X-Cache $upstream_cache_status;
|
40 |
+
#Set Nginx Cache
|
41 |
}
|
42 |
+
|
43 |
+
location /files{
|
44 |
+
proxy_pass https://files.yande.re/;
|
45 |
+
proxy_set_header Host files.yande.re;
|
46 |
+
proxy_set_header Referer "https://yande.re";
|
47 |
+
proxy_set_header X-Real-IP $remote_addr;
|
48 |
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
49 |
+
proxy_set_header REMOTE-HOST $remote_addr;
|
50 |
+
#Persistent connection related configuration
|
51 |
+
add_header X-Cache $upstream_cache_status;
|
52 |
+
#Set Nginx Cache
|
53 |
}
|
54 |
|
55 |
+
location /assets{
|
56 |
+
proxy_pass https://assets.yande.re/;
|
57 |
+
proxy_set_header Host assets.yande.re;
|
58 |
+
proxy_set_header Referer "https://yande.re";
|
59 |
+
proxy_set_header X-Real-IP $remote_addr;
|
60 |
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
61 |
+
proxy_set_header REMOTE-HOST $remote_addr;
|
62 |
+
#Persistent connection related configuration
|
63 |
+
add_header X-Cache $upstream_cache_status;
|
64 |
+
#Set Nginx Cache
|
65 |
}
|
66 |
|
67 |
+
|
68 |
+
|
|
|
|
|
|
|
69 |
|
70 |
|
71 |
|
|
|
72 |
}
|
73 |
+
}
|