TSG-23454 Add key scan in http request header and response header.

TSG-23455 Change profile_name to content_name in Replace File policy.
TSG-23424 Change tsg_policy_id to tsg_policy_uuid in Redirect policy.
This commit is contained in:
fengweihao
2024-11-07 16:13:55 +08:00
parent d4d76f0951
commit ec75b72bd9
2 changed files with 19 additions and 6 deletions

View File

@@ -183,15 +183,15 @@ TEST(PatternReplace, UrlReplace)
char replace_with[TFE_SYMBOL_MAX]={0};
char *rewrite_uri=NULL;
const char *rd_url = "http://www.example.com/query?pageid=12345&policy_id={{tsg_policy_id}}&user_id={{tsg_subscriber_id}}&source_ip={{tsg_client_ip}}";
const char *rd_url = "http://www.example.com/query?pageid=12345&policy_id={{tsg_policy_uuid}}&user_id={{tsg_subscriber_id}}&source_ip={{tsg_client_ip}}";
struct replace_rule rule[3];
memset(rule, 0, sizeof(struct replace_rule));
if(strcasestr(rd_url,"{{tsg_policy_id}}") != NULL)
if(strcasestr(rd_url,"{{tsg_policy_uuid}}") != NULL)
{
rule[n_rule].zone = kZoneRequestUri;
rule[n_rule].find = tfe_strdup("{{tsg_policy_id}}");
rule[n_rule].find = tfe_strdup("{{tsg_policy_uuid}}");
snprintf(replace_with, TFE_SYMBOL_MAX, "%d", 23);
rule[n_rule].replace_with = tfe_strdup(replace_with);
n_rule++;