Скрытие IP за обратным прокси? - PullRequest
0 голосов
/ 23 июня 2019

Я настроил свой обратный прокси на моем сервере. Когда я набираю curl -I -X GET domain.com, в ответе отображается реальный IP-адрес. Как это исправить?

Output:
HTTP/1.1 301 Moved Permanently
Date: Sun, 23 Jun 2019 11:47:39 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 57
Connection: keep-alive
Set-Cookie: __cfduid=...; expires=Mon, 22-Jun-20 11:47:39 GMT; path=/; domain=.domain.com; HttpOnly
Location: https://therealip:1234;
Vary: Accept, Accept-Encoding
Cache-Control: public, max-age=86400, s-maxage=10
X-Content-Type-Options: nosniff
Server: cloudflare
CF-RAY: ...
...
location / {
 add_header Cache-Control max-age=86400;
 proxy_pass http://therealip:1234;
 proxy_redirect   default;
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
 proxy_max_temp_file_size 0;
}
...
...