Fixed X-Real-IP header support.
This commit is contained in:
parent
de0d0cbcdb
commit
08bab96a6a
1 changed files with 2 additions and 2 deletions
|
@ -339,7 +339,7 @@ namespace Mist {
|
||||||
/*LTS-START*/
|
/*LTS-START*/
|
||||||
std::string HTTPOutput::getConnectedHost(){
|
std::string HTTPOutput::getConnectedHost(){
|
||||||
std::string host = Output::getConnectedHost();
|
std::string host = Output::getConnectedHost();
|
||||||
std::string xRealIp = H.GetHeader("x-real-ip");
|
std::string xRealIp = H.GetHeader("X-Real-IP");
|
||||||
|
|
||||||
if (!isTrustedProxy(host) || !xRealIp.size()){
|
if (!isTrustedProxy(host) || !xRealIp.size()){
|
||||||
static bool msg = false;
|
static bool msg = false;
|
||||||
|
@ -354,7 +354,7 @@ namespace Mist {
|
||||||
std::string HTTPOutput::getConnectedBinHost(){
|
std::string HTTPOutput::getConnectedBinHost(){
|
||||||
//Do first check with connected host because of simplicity
|
//Do first check with connected host because of simplicity
|
||||||
std::string host = Output::getConnectedHost();
|
std::string host = Output::getConnectedHost();
|
||||||
std::string xRealIp = H.GetHeader("x-real-ip");
|
std::string xRealIp = H.GetHeader("X-Real-IP");
|
||||||
|
|
||||||
if (!isTrustedProxy(host) || !xRealIp.size()){
|
if (!isTrustedProxy(host) || !xRealIp.size()){
|
||||||
static bool msg = false;
|
static bool msg = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue