change path for login page

This commit is contained in:
Dario 2019-10-22 15:40:23 +02:00
parent 949b24860d
commit 860e1a2391
5 changed files with 6 additions and 3 deletions

View File

@ -59,7 +59,7 @@ void LoginPage::handleRequest(Poco::Net::HTTPServerRequest& request, Poco::Net::
return;
case USER_NO_PRIVATE_KEY:
case USER_COMPLETE:
response.redirect(ServerConfig::g_serverPath + "/");
response.redirect(ServerConfig::g_php_serverPath + "/");
return;
}

View File

@ -61,7 +61,7 @@ Poco::JSON::Object* JsonGetLogin::handle(Poco::Dynamic::Var params)
return result;
}
result->set("state", "success");
result->set("clientIP", session->getClientIp());
result->set("clientIP", session->getClientIp().toString());
result->set("user", user->getJson());
return result;
}

View File

@ -38,6 +38,7 @@ namespace ServerConfig {
EmailAccount g_EmailAccount;
int g_SessionTimeout = SESSION_TIMEOUT_DEFAULT;
std::string g_serverPath;
std::string g_php_serverPath;
bool loadMnemonicWordLists()
{
@ -90,6 +91,7 @@ namespace ServerConfig {
DISASM_FALSERET;
g_SessionTimeout = cfg.getInt("session.timeout", SESSION_TIMEOUT_DEFAULT);
g_serverPath = cfg.getString("loginServer.path", "");
g_php_serverPath = cfg.getString("phpServer.url", "");
return true;
}

View File

@ -34,6 +34,7 @@ namespace ServerConfig {
extern EmailAccount g_EmailAccount;
extern int g_SessionTimeout;
extern std::string g_serverPath;
extern std::string g_php_serverPath;
bool loadMnemonicWordLists();

View File

@ -46,7 +46,7 @@
return;
case USER_NO_PRIVATE_KEY:
case USER_COMPLETE:
response.redirect(ServerConfig::g_serverPath + "/");
response.redirect(ServerConfig::g_php_serverPath + "/");
return;
}