diff --git a/src/modules/Workers/WebService/WebService.cpp b/src/modules/Workers/WebService/WebService.cpp index 2bee227..80dd0ff 100644 --- a/src/modules/Workers/WebService/WebService.cpp +++ b/src/modules/Workers/WebService/WebService.cpp @@ -942,7 +942,6 @@ namespace Apostol { ProxyRequest.Clear(); ProxyRequest.Location = Location.hostname + caServerRequest.Location.pathname + caServerRequest.Location.search; - ProxyRequest.Headers.Values("Host", ProxyRequest.Location.Host()); if (Method == "POST") { ProxyRequest.ContentType = StringToContentType(caContentType); @@ -953,6 +952,8 @@ namespace Apostol { CHTTPRequest::Prepare(ProxyRequest, Method.c_str(), URI.c_str(), caContentType.c_str()); + ProxyRequest.Headers.Values("Host", ProxyRequest.Location.Host()); + ProxyRequest.AddHeader("Authorization", "Bearer " + caContext.Tokens()["access_token"]); if (!caModuleAddress.IsEmpty())