mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-25 20:27:34 +08:00
fixed #51
This commit is contained in:
parent
ee8edb8ba8
commit
1c89c60963
@ -56,8 +56,8 @@ onceToken token1([](){
|
||||
}//namespace Http
|
||||
} // namespace mediakit
|
||||
|
||||
|
||||
static onceToken s_token([](){
|
||||
void initEventListener(){
|
||||
static onceToken s_token([](){
|
||||
NoticeCenter::Instance().addListener(nullptr,Broadcast::kBroadcastHttpRequest,[](BroadcastHttpRequestArgs){
|
||||
//const Parser &parser,HttpSession::HttpResponseInvoker &invoker,bool &consumed
|
||||
if(strstr(parser.Url().data(),"/api/") != parser.Url().data()){
|
||||
@ -98,7 +98,8 @@ static onceToken s_token([](){
|
||||
invoker("200 OK",headerOut,contentOut);
|
||||
});
|
||||
});
|
||||
}, nullptr);
|
||||
}, nullptr);
|
||||
}
|
||||
|
||||
int main(int argc,char *argv[]){
|
||||
//设置退出信号处理函数
|
||||
@ -111,6 +112,7 @@ int main(int argc,char *argv[]){
|
||||
|
||||
//加载配置文件,如果配置文件不存在就创建一个
|
||||
loadIniConfig();
|
||||
initEventListener();
|
||||
|
||||
//加载证书,证书包含公钥和私钥
|
||||
SSL_Initor::Instance().loadCertificate((exeDir() + "ssl.p12").data());
|
||||
|
Loading…
Reference in New Issue
Block a user