mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Fix #1255, support vhost/domain in query string for HTTP streaming. 3.0.90
This commit is contained in:
parent
8a28a11648
commit
eb8e7ad479
5 changed files with 77 additions and 4 deletions
|
@ -491,6 +491,16 @@ string SrsHttpMessage::url()
|
|||
|
||||
string SrsHttpMessage::host()
|
||||
{
|
||||
std::map<string, string>::iterator it = _query.find("vhost");
|
||||
if (it != _query.end() && !it->second.empty()) {
|
||||
return it->second;
|
||||
}
|
||||
|
||||
it = _query.find("domain");
|
||||
if (it != _query.end() && !it->second.empty()) {
|
||||
return it->second;
|
||||
}
|
||||
|
||||
return _uri->get_host();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue