summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorlinuxdaemon <linuxdaemon@users.noreply.github.com>2019-01-03 20:07:01 -0600
committerAdam <adam@sigterm.info>2019-01-03 21:07:01 -0500
commitcf44418e1055376adb1e5d284f2a174b7751f39b (patch)
tree585c3dd7977453b6fa922e19f821efa05cfba655 /modules
parent6fbb7cffe9954d1e5cc9038a18d4695ad2a19d2d (diff)
Allow multiple IP addresses in extforward_ip separated by spaces
Diffstat (limited to 'modules')
-rw-r--r--modules/m_httpd.cpp4
1 files changed, 2 insertions, 2 deletions
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);
}