struct list acl; /* ACL declared on this proxy */
struct list http_req_rules; /* HTTP request rules: allow/deny/... */
struct list http_res_rules; /* HTTP response rules: allow/deny/... */
- struct list block_cond; /* early blocking conditions (chained) */
+ struct list block_rules; /* http-request block rules to be inserted before other ones */
struct list redirect_rules; /* content redirecting rules (chained) */
struct list switching_rules; /* content switching rules (chained) */
struct list persist_rules; /* 'force-persist' and 'ignore-persist' rules (chained) */
*/
int warnif_rule_after_block(struct proxy *proxy, const char *file, int line, const char *arg)
{
- if (!LIST_ISEMPTY(&proxy->block_cond)) {
+ if (!LIST_ISEMPTY(&proxy->block_rules)) {
Warning("parsing [%s:%d] : a '%s' rule placed after a 'block' rule will still be processed before.\n",
file, line, arg);
return 1;
goto out;
}
- LIST_ADDQ(&curproxy->block_cond, &cond->list);
+ LIST_ADDQ(&curproxy->block_rules, &cond->list);
warnif_misplaced_block(curproxy, file, linenum, args[0]);
}
else if (!strcmp(args[0], "redirect")) {
free(cwl);
}
- list_for_each_entry_safe(cond, condb, &p->block_cond, list) {
+ list_for_each_entry_safe(cond, condb, &p->block_rules, list) {
LIST_DEL(&cond->list);
prune_acl_cond(cond);
free(cond);
session_inc_be_http_req_ctr(s);
/* first check whether we have some ACLs set to block this request */
- list_for_each_entry(cond, &px->block_cond, list) {
+ list_for_each_entry(cond, &px->block_rules, list) {
int ret = acl_exec_cond(cond, px, s, txn, SMP_OPT_DIR_REQ|SMP_OPT_FINAL);
ret = acl_pass(ret);
LIST_INIT(&p->acl);
LIST_INIT(&p->http_req_rules);
LIST_INIT(&p->http_res_rules);
- LIST_INIT(&p->block_cond);
+ LIST_INIT(&p->block_rules);
LIST_INIT(&p->redirect_rules);
LIST_INIT(&p->mon_fail_cond);
LIST_INIT(&p->switching_rules);