From 9e85f255ef3198bfeaa90cf5ba01499f563e151c Mon Sep 17 00:00:00 2001
From: Thulinma <jaron@vietors.com>
Date: Tue, 3 May 2016 17:01:46 +0200
Subject: [PATCH] Suppress untrusted proxy messages if not relevant.

---
 src/output/output_http.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/output/output_http.cpp b/src/output/output_http.cpp
index a4979fba..2cffaab5 100644
--- a/src/output/output_http.cpp
+++ b/src/output/output_http.cpp
@@ -343,7 +343,7 @@ namespace Mist {
 
     if (!isTrustedProxy(host) || !xRealIp.size()){
       static bool msg = false;
-      if (xRealIp.size() && !msg){
+      if (xRealIp.size() && !msg && xRealIp != host){
         WARN_MSG("Host %s is attempting to act as a proxy, but not trusted", host.c_str());
         msg = true;
       }
@@ -358,7 +358,7 @@ namespace Mist {
 
     if (!isTrustedProxy(host) || !xRealIp.size()){
       static bool msg = false;
-      if (xRealIp.size() && !msg){
+      if (xRealIp.size() && !msg && xRealIp != host){
         WARN_MSG("Host %s is attempting to act as a proxy, but not trusted", host.c_str());
         msg = true;
       }