From 6a786f807b4330abc76f30cebc037d09618eace8 Mon Sep 17 00:00:00 2001 From: Tryggvi Larusson Date: Wed, 24 Feb 2016 12:49:14 +0000 Subject: [PATCH 1/2] adding support for debian 8 build --- install_prereqs.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install_prereqs.sh b/install_prereqs.sh index 05fa03a6..c4898991 100755 --- a/install_prereqs.sh +++ b/install_prereqs.sh @@ -157,6 +157,10 @@ case $DISTRO in echo 'git, svn-devel, autotools, gcc, g++, boost, openssl-devel and libpng-devel. For tracing to work, libdwarf is also required' exit 1 ;; + Debian*8*) + apt-get -y install git-core build-essential openssl libpng-dev libboost-all-dev libpng-dev libdwarf-dev subversion subversion-tools cmake + exit 1 + ;; *) echo 'Distro not found! You shall need git, svn-devel, autotools, gcc, g++, boost, openssl-devel and libpng-devel to successfully build this package.' echo 'For tracing to work, libdwarf is also required.' From d6b17a25980b94822bcc6d1e3f300e2509dcd6e8 Mon Sep 17 00:00:00 2001 From: Tryggvi Larusson Date: Wed, 24 Feb 2016 12:50:49 +0000 Subject: [PATCH 2/2] Adding support for running behind a ssl proxy with X-Forwarded-Proto header --- wsgate/wsgateEHS.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wsgate/wsgateEHS.cpp b/wsgate/wsgateEHS.cpp index f1139454..873c1753 100644 --- a/wsgate/wsgateEHS.cpp +++ b/wsgate/wsgateEHS.cpp @@ -536,8 +536,11 @@ namespace wsgate{ MimeType mt = simpleMime(to_lower_copy(basename)); if (HTML == mt) { ostringstream oss; - - oss << (request->Secure() ? "wss://" : "ws://") << thisHost << "/wsgate"; + bool is_secure = request->Secure(); + if (request->Headers("X-Forwarded-Proto").compare("https") == 0) { + is_secure=true; + } + oss << (is_secure ? "wss://" : "ws://") << thisHost << "/wsgate"; replace_all(body, "%WSURI%", oss.str()); replace_all(body, "%JSDEBUG%", (bDynDebug ? "-debug" : ""));