1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2025-08-03 12:50:02 +00:00

Append the protocol to the uri from the code.

This means if you set uri name to http://example.com in the
config file you will actually get base_uri to be
http://http://example.com.
This commit is contained in:
King_DuckZ 2017-05-18 18:42:12 +01:00
parent 59a5d35ee0
commit c5f2bc055a
6 changed files with 23 additions and 6 deletions

View file

@ -146,6 +146,10 @@ namespace cgi {
return m_cgi_env[CGIVars::SERVER_NAME];
}
bool Env::https() const {
return m_cgi_env[CGIVars::HTTPS] == "on";
}
uint16_t Env::server_port() const {
using dhandy::lexical_cast;
const std::string& value = m_cgi_env[CGIVars::SERVER_PORT];