diff --git a/src/app/Context.hpp b/src/app/Context.hpp index 856892f..ea14eb3 100644 --- a/src/app/Context.hpp +++ b/src/app/Context.hpp @@ -25,7 +25,8 @@ Author: #define BPS_SERVER_PORT 4977 #define BPS_SERVER_URL "http://localhost:4977" #define BPS_BM_SERVER_ADDRESS "BM-2cX8y9u9yEi3fdqQfndx9F6NdR5Hv79add" -#define BPS_BM_DEBUG_ADDRESS "BM-2cXtL92m3CavBKx8qsV2LbZtAU3eQxW2rB" +//#define BPS_BM_DEBUG_ADDRESS "BM-2cXtL92m3CavBKx8qsV2LbZtAU3eQxW2rB" +#define BPS_BM_DEBUG_ADDRESS "BM-2cX8y9u9yEi3fdqQfndx9F6NdR5Hv79add" //---------------------------------------------------------------------------------------------------------------------- #ifdef __cplusplus diff --git a/src/modules/Workers/WebService/WebService.cpp b/src/modules/Workers/WebService/WebService.cpp index 2311ea3..280ab60 100644 --- a/src/modules/Workers/WebService/WebService.cpp +++ b/src/modules/Workers/WebService/WebService.cpp @@ -263,10 +263,10 @@ namespace Apostol { const auto &caContext = index == -1 ? m_CurrentServer : m_Servers[index].Value(); const auto &caServer = caContext.URL().Origin(); - CStringList caClearText; CString sPayload; if (!caServerRequest.Content.IsEmpty()) { + CStringList caClearText; const auto &ContentType = caServerRequest.Headers.Values(_T("content-type")); @@ -435,6 +435,8 @@ namespace Apostol { if (!caOrigin.IsEmpty()) { Json.Object().AddPair("origin", caOrigin); + } else { + Json.Object().AddPair("origin", GetProtocol(AConnection) + "://" + caHost); } Json.Object().AddPair("module", Module);