mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
adding php server host to config
This commit is contained in:
parent
31e00d9081
commit
2f4701f0b5
@ -48,6 +48,7 @@ namespace ServerConfig {
|
||||
Languages g_default_locale;
|
||||
std::string g_php_serverPath;
|
||||
std::string g_php_serverHost;
|
||||
int g_phpServerPort;
|
||||
Poco::Mutex g_TimeMutex;
|
||||
int g_FakeLoginSleepTime = 820;
|
||||
std::string g_versionString = "";
|
||||
@ -212,6 +213,7 @@ namespace ServerConfig {
|
||||
replaceZeroIPWithLocalhostIP(g_serverPath);
|
||||
g_default_locale = LanguageManager::languageFromString(cfg.getString("loginServer.default_locale"));
|
||||
g_serverPort = cfg.getInt("loginServer.port", 0);
|
||||
g_phpServerPort = cfg.getInt("phpServer.port", 0);
|
||||
// replace 0.0.0.0 with actual server ip
|
||||
|
||||
g_php_serverPath = cfg.getString("phpServer.url", "");
|
||||
|
||||
@ -57,6 +57,7 @@ namespace ServerConfig {
|
||||
extern Languages g_default_locale;
|
||||
extern std::string g_php_serverPath;
|
||||
extern std::string g_php_serverHost;
|
||||
extern int g_phpServerPort;
|
||||
extern Poco::Mutex g_TimeMutex;
|
||||
extern int g_FakeLoginSleepTime;
|
||||
extern std::string g_versionString;
|
||||
|
||||
@ -37,6 +37,7 @@ JsonRequestReturn JsonRequest::request(const char* methodName, const Poco::Net::
|
||||
try {
|
||||
Profiler phpRequestTime;
|
||||
Poco::Net::HTTPSClientSession httpsClientSession(mServerHost, mServerPort);
|
||||
|
||||
Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_POST, "/JsonRequestHandler");
|
||||
|
||||
request.setChunkedTransferEncoding(true);
|
||||
|
||||
@ -165,8 +165,8 @@ int SigningTransaction::run() {
|
||||
try {
|
||||
Profiler phpRequestTime;
|
||||
Poco::Net::HTTPClientSession* clientSession = nullptr;
|
||||
if (ServerConfig::g_serverPort) {
|
||||
clientSession = new Poco::Net::HTTPSClientSession(ServerConfig::g_php_serverHost, ServerConfig::g_serverPort);
|
||||
if (ServerConfig::g_phpServerPort) {
|
||||
clientSession = new Poco::Net::HTTPSClientSession(ServerConfig::g_php_serverHost, ServerConfig::g_phpServerPort);
|
||||
}
|
||||
else if (ServerConfig::SERVER_TYPE_PRODUCTION == ServerConfig::g_ServerSetupType ||
|
||||
ServerConfig::SERVER_TYPE_STAGING == ServerConfig::g_ServerSetupType) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user