It's just a warning emitted once.
extern unsigned int warned; /* bitfield of a few warnings to emit just once */
/* bit values to go with "warned" above */
-/* #define WARN_* */
+#define WARN_BLOCK_DEPRECATED 0x00000001
/* to be used with warned and WARN_* */
static inline int already_warned(unsigned int warning)
(curproxy->cap & PR_CAP_FE) ? SMP_VAL_FE_HRQ_HDR : SMP_VAL_BE_HRQ_HDR,
file, linenum);
LIST_ADDQ(&curproxy->block_rules, &rule->list);
+
+ if (!already_warned(WARN_BLOCK_DEPRECATED))
+ Warning("parsing [%s:%d] : The '%s' directive is now deprecated in favor of 'http-request deny' which uses the exact same syntax. The rules are translated but support might disappear in a future version.\n", file, linenum, args[0]);
+
}
else if (!strcmp(args[0], "redirect")) {
struct redirect_rule *rule;