-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for more generic HTTP prefixes #22
Conversation
Do not force the HTTP plugin to have a prefix that starts with the hostname. Instead, make it so you can cut an arbitrary prefix off the incoming path and prepend it with an arbitrary URL base.
|
||
if( this->http_host_name.empty() ) { | ||
m_log.Emsg("Config", "httpserver.host_name not specified"); | ||
return false; | ||
} | ||
if( this->http_host_url.empty() ) { | ||
m_log.Emsg("Config", "httpserver.host_url not specified"); | ||
return false; | ||
if (m_url_base.empty()) { | ||
if (http_host_name.empty()) { | ||
m_log.Emsg("Config", "httpserver.host_name not specified; this or httpserver.url_base are required"); | ||
return false; | ||
} | ||
if (http_host_url.empty()) { | ||
m_log.Emsg("Config", "httpserver.host_url not specified; this or httpserver.url_base are required"); | ||
return false; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[lint] reported by reviewdog 🐶
if( this->http_host_name.empty() ) { | |
m_log.Emsg("Config", "httpserver.host_name not specified"); | |
return false; | |
} | |
if( this->http_host_url.empty() ) { | |
m_log.Emsg("Config", "httpserver.host_url not specified"); | |
return false; | |
if (m_url_base.empty()) { | |
if (http_host_name.empty()) { | |
m_log.Emsg("Config", "httpserver.host_name not specified; this or httpserver.url_base are required"); | |
return false; | |
} | |
if (http_host_url.empty()) { | |
m_log.Emsg("Config", "httpserver.host_url not specified; this or httpserver.url_base are required"); | |
return false; | |
} | |
value = temporary; | |
if (!handle_required_config(attribute, "httpserver.host_name", value, | |
http_host_name) || | |
!handle_required_config(attribute, "httpserver.host_url", value, | |
http_host_url) || | |
!handle_required_config(attribute, "httpserver.url_base", value, | |
m_url_base) || | |
!handle_required_config(attribute, "httpserver.storage_prefix", value, | |
m_storage_prefix)) { | |
Config.Close(); | |
return false; |
if (http_host_url.empty()) { | ||
m_log.Emsg("Config", "httpserver.host_url not specified; this or httpserver.url_base are required"); | ||
return false; | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[lint] reported by reviewdog 🐶
} | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Built on top of #21; merge that first.