mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
完善http option命令
This commit is contained in:
parent
3f36a10bee
commit
02bd01c83b
@ -38,10 +38,14 @@ void HttpSession::Handle_Req_HEAD(ssize_t &content_len){
|
||||
sendResponse(200, true);
|
||||
}
|
||||
|
||||
void HttpSession::Handle_Req_OPTIONS(ssize_t &content_len)
|
||||
{
|
||||
//暂时对OPTINS进行200 OK回复
|
||||
sendResponse(200, true);
|
||||
void HttpSession::Handle_Req_OPTIONS(ssize_t &content_len) {
|
||||
KeyValue header;
|
||||
header.emplace("Allow", "GET, POST, OPTIONS");
|
||||
header.emplace("Access-Control-Allow-Origin", "*");
|
||||
header.emplace("Access-Control-Allow-Credentials", "true");
|
||||
header.emplace("Access-Control-Request-Methods", "GET, POST, OPTIONS");
|
||||
header.emplace("Access-Control-Request-Headers", "Accept,Accept-Language,Content-Language,Content-Type");
|
||||
sendResponse(200, true, nullptr, header);
|
||||
}
|
||||
|
||||
ssize_t HttpSession::onRecvHeader(const char *header,size_t len) {
|
||||
|
Loading…
Reference in New Issue
Block a user