mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
check 'vhost' validity in 'http raw dvr api' (#2435)
This commit is contained in:
parent
d02ba80db1
commit
f986b5956b
2 changed files with 14 additions and 1 deletions
|
@ -1206,7 +1206,12 @@ srs_error_t SrsGoApiRaw::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage*
|
|||
if (action != "enable" && action != "disable") {
|
||||
return srs_api_response_code(w, r, ERROR_SYSTEM_CONFIG_RAW_NOT_ALLOWED);
|
||||
}
|
||||
|
||||
|
||||
// the vhost must exists.
|
||||
if (!_srs_config->get_vhost(value, false)) {
|
||||
return srs_api_response_code(w, r, ERROR_SYSTEM_CONFIG_RAW_PARAMS);
|
||||
}
|
||||
|
||||
if (!_srs_config->get_dvr_enabled(value)) {
|
||||
return srs_api_response_code(w, r, ERROR_SYSTEM_CONFIG_RAW_NOT_ALLOWED);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue