From cf44418e1055376adb1e5d284f2a174b7751f39b Mon Sep 17 00:00:00 2001 From: linuxdaemon Date: Thu, 3 Jan 2019 20:07:01 -0600 Subject: Allow multiple IP addresses in extforward_ip separated by spaces --- modules/m_httpd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/m_httpd.cpp b/modules/m_httpd.cpp index 39305cb4c..0a7afd412 100644 --- a/modules/m_httpd.cpp +++ b/modules/m_httpd.cpp @@ -67,7 +67,7 @@ class MyHTTPClient : public HTTPClient return; } - if (this->ip == this->provider->ext_ip) + if (std::find(this->provider->ext_ips.begin(), this->provider->ext_ips.end(), this->ip) != this->provider->ext_ips.end()) { for (unsigned i = 0; i < this->provider->ext_headers.size(); ++i) { @@ -435,7 +435,7 @@ class HTTPD : public Module } - p->ext_ip = ext_ip; + spacesepstream(ext_ip).GetTokens(p->ext_ips); spacesepstream(ext_header).GetTokens(p->ext_headers); } -- cgit