首页 > 解决方案 > 如何从检查网络标头中隐藏远程地址。从 nginx 配置

问题描述

我的 IP 地址 Web 应用程序显示在检查的网络标头中。出于安全目的,我想隐藏它们。我需要在 nginx 的配置中设置什么属性?

location / {

    proxy_set_header                Host $host;
    proxy_set_header                X-Real-IP $remote_addr;
    #proxy_set_header               X-Forwarded-For $proxy_add_x_forwarded_for;
    real_ip_header                  X-Forwarded-For;

    }

我尝试了上述配置脚本,但远程地址变得相同。

标签: nginx-config

解决方案


推荐阅读