Spaces:
Runtime error
Runtime error
Commit
·
b41cfb6
1
Parent(s):
45af229
Update nginx.conf
Browse files- nginx.conf +35 -12
nginx.conf
CHANGED
@@ -1,14 +1,37 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
}
|
|
|
14 |
}
|
|
|
1 |
+
server {
|
2 |
+
listen 7860 default_server;
|
3 |
+
listen [::]:7860 default_server;
|
4 |
+
|
5 |
+
server_name _;
|
6 |
+
|
7 |
+
resolver 1.1.1.1;
|
8 |
+
|
9 |
+
location /ping {
|
10 |
+
default_type application/json;
|
11 |
+
return 200 '{"status":"success","result":"nginx json"}';
|
12 |
+
}
|
13 |
+
|
14 |
+
location /api/ip {
|
15 |
+
proxy_pass https://api.nn.ci/ip;
|
16 |
+
add_header x-url $arg_url;
|
17 |
+
proxy_http_version 1.1;
|
18 |
+
proxy_set_header Upgrade $http_upgrade;
|
19 |
+
proxy_set_header Connection 'upgrade';
|
20 |
+
proxy_cache_bypass $http_upgrade;
|
21 |
+
proxy_read_timeout 86400;
|
22 |
+
}
|
23 |
+
|
24 |
+
location / {
|
25 |
+
proxy_pass $arg_url;
|
26 |
+
add_header x-url $arg_url;
|
27 |
+
proxy_http_version 1.1;
|
28 |
+
proxy_set_header Upgrade $http_upgrade;
|
29 |
+
proxy_set_header Connection 'upgrade';
|
30 |
+
proxy_cache_bypass $http_upgrade;
|
31 |
+
proxy_read_timeout 86400;
|
32 |
+
add_header Cache-control max-age=2592000;
|
33 |
+
proxy_ssl_server_name on;
|
34 |
+
proxy_ssl_verify off;
|
35 |
}
|
36 |
+
|
37 |
}
|