Added generic PUSH_REWRITE trigger, fixed request URL bug

This commit is contained in:
Thulinma 2020-11-30 15:19:55 +01:00
parent ea49344628
commit 7c6da9d455
9 changed files with 163 additions and 17 deletions

View file

@ -3,6 +3,7 @@
#include <mist/langcodes.h>
#include <mist/stream.h>
#include <mist/util.h>
#include <mist/url.h>
#include <set>
#include <sys/stat.h>
@ -234,7 +235,12 @@ namespace Mist{
}
/*LTS-START*/
reqUrl = H.url + H.allVars();
{
HTTP::URL qUrl("http://"+H.GetHeader("Host")+"/"+H.url + H.allVars());
if (!qUrl.host.size()){qUrl.host = myConn.getBoundAddress();}
if (!qUrl.port.size() && config->hasOption("port")){qUrl.port = config->getOption("port").asString();}
reqUrl = qUrl.getUrl();
}
/*LTS-END*/
if (H.hasHeader("User-Agent")){UA = H.GetHeader("User-Agent");}
if (hasSessionIDs()){