OMPUB-462 iOS操作系统使用Chrome浏览器访问个别HTTP2网站Deny Profile未生效
TSG-10278 删除Deny模板文件中系统除了信息
This commit is contained in:
@@ -1313,10 +1313,9 @@ static enum pangu_action decide_ctrl_action(const struct Maat_rule_t * hit_rules
|
||||
return prior_action;
|
||||
}
|
||||
//HTML template is downloaded from https://github.com/AndiDittrich/HttpErrorPages
|
||||
static void template_generate(int status_code, int cfg_id, const char* msg, char ** page_buff, size_t * page_size)
|
||||
static void template_generate(int status_code, const char* msg, char ** page_buff, size_t * page_size)
|
||||
{
|
||||
ctemplate::TemplateDictionary dict("pg_page_dict"); //dict is automatically finalized after function returned.
|
||||
dict.SetIntValue("cfg_id", cfg_id);
|
||||
|
||||
if (NULL == msg)
|
||||
{
|
||||
@@ -1366,7 +1365,6 @@ static int html_generate(int profile_id, const char* msg, char ** page_buff, siz
|
||||
if(!strncmp(block_profile->profile_type, "template", strlen(block_profile->profile_type)))
|
||||
{
|
||||
ctemplate::TemplateDictionary dict("pg_page_dict"); //dict is automatically finalized after function returned.
|
||||
dict.SetIntValue("cfg_id", profile_id);
|
||||
dict.SetValue("msg", msg);
|
||||
std::string output;
|
||||
|
||||
@@ -1740,7 +1738,7 @@ static void http_block(const struct tfe_stream * stream, const struct tfe_http_s
|
||||
message = rewrite_message;
|
||||
}
|
||||
/*read local configuration**/
|
||||
template_generate(resp_code, ctx->enforce_rules[0].config_id, message, &page_buff, &page_size);
|
||||
template_generate(resp_code, message, &page_buff, &page_size);
|
||||
if(rewrite_message_sz>0 && rewrite_message!= NULL)
|
||||
{
|
||||
FREE(&rewrite_message);
|
||||
|
||||
Reference in New Issue
Block a user