mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-10-31 08:39:34 +08:00
优化虚拟主机相关
This commit is contained in:
parent
c1b6df7bc7
commit
a109d966c8
@ -230,6 +230,8 @@ void MediaInfo::parse(const string &url){
|
||||
_streamid = steamid;
|
||||
}
|
||||
}
|
||||
|
||||
GET_CONFIG(bool,enableVhost,General::kEnableVhost);
|
||||
if(_vhost.empty()){
|
||||
//无效vhost
|
||||
_vhost = DEFAULT_VHOST;
|
||||
@ -237,17 +239,15 @@ void MediaInfo::parse(const string &url){
|
||||
if(INADDR_NONE != inet_addr(_vhost.data())){
|
||||
//这是ip,未指定vhost;使用默认vhost
|
||||
_vhost = DEFAULT_VHOST;
|
||||
}else if(_vhost == "localhost"){
|
||||
//localhost也是默认vhost
|
||||
_vhost = DEFAULT_VHOST;
|
||||
}else if(!enableVhost){
|
||||
//关闭了虚拟主机
|
||||
_vhost = DEFAULT_VHOST;
|
||||
}
|
||||
}
|
||||
|
||||
if(_vhost == "localhost"){
|
||||
_vhost = DEFAULT_VHOST;
|
||||
}
|
||||
|
||||
GET_CONFIG(bool,enableVhost,General::kEnableVhost);
|
||||
if(!enableVhost){
|
||||
_vhost = DEFAULT_VHOST;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user