From 52fe4de2fdde40ec71764398f92684a16d3c9511 Mon Sep 17 00:00:00 2001 From: dnomd343 Date: Sat, 10 Jul 2021 21:45:21 +0800 Subject: [PATCH] fix: error return with localhost of 1601 port's root query --- conf/docker/ip.conf | 4 ++-- conf/docker/nginx.conf | 6 +++--- conf/nginx/ip.conf | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/conf/docker/ip.conf b/conf/docker/ip.conf index 2d2530d..cf0063d 100644 --- a/conf/docker/ip.conf +++ b/conf/docker/ip.conf @@ -24,9 +24,9 @@ server { } location = / { - set $query_param ?justip=true&cli=true; + proxy_set_header X-Real-IP $remote_addr; if ($http_user_agent ~* (curl|wget)) { - proxy_pass http://$my_host/query$query_param; + proxy_pass http://$my_host/query?justip=true&cli=true; } index index.html; } diff --git a/conf/docker/nginx.conf b/conf/docker/nginx.conf index fa68023..939aedd 100644 --- a/conf/docker/nginx.conf +++ b/conf/docker/nginx.conf @@ -4,10 +4,10 @@ pcre_jit on; include /etc/nginx/modules/*.conf; events { - worker_connections 1024; + worker_connections 1024; } http { - include /etc/nginx/mime.types; - include /etc/nginx/echoip.conf; + include /etc/nginx/mime.types; + include /etc/nginx/echoip.conf; } \ No newline at end of file diff --git a/conf/nginx/ip.conf b/conf/nginx/ip.conf index e09d538..3444cd0 100644 --- a/conf/nginx/ip.conf +++ b/conf/nginx/ip.conf @@ -60,9 +60,9 @@ server { } location = / { - set $query_param ?justip=true&cli=true; + proxy_set_header X-Real-IP $remote_addr; if ($http_user_agent ~* (curl|wget)) { - proxy_pass http://$my_host/query$query_param; + proxy_pass http://$my_host/query?justip=true&cli=true; } index index.html; }