mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
优化虚拟主机相关
This commit is contained in:
parent
d0deea8b58
commit
f8f3c5dd19
@ -232,17 +232,7 @@ void MediaInfo::parse(const string &url){
|
|||||||
}
|
}
|
||||||
|
|
||||||
GET_CONFIG(bool,enableVhost,General::kEnableVhost);
|
GET_CONFIG(bool,enableVhost,General::kEnableVhost);
|
||||||
if(_vhost.empty()){
|
if(!enableVhost || _vhost.empty() || _vhost == "localhost" || INADDR_NONE != inet_addr(_vhost.data())){
|
||||||
//无效vhost
|
|
||||||
_vhost = DEFAULT_VHOST;
|
|
||||||
}else 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;
|
_vhost = DEFAULT_VHOST;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user