blob: 713e0c0b062a3285ccce527fc28be530544c7650 [file] [log] [blame]
Willy Tarreau61c112a2018-10-02 16:43:32 +02001/*
2 * include/proto/http_rules.h
3 * This file contains "http" rules definitions
4 *
5 * Copyright (C) 2000-2018 Willy Tarreau - w@1wt.eu
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation, version 2.1
10 * exclusively.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22#ifndef _PROTO_HTTP_RULES_H
23#define _PROTO_HTTP_RULES_H
24
25#include <common/config.h>
26#include <common/mini-clist.h>
27#include <types/action.h>
28#include <types/proxy.h>
29
30extern struct action_kw_list http_req_keywords;
31extern struct action_kw_list http_res_keywords;
32
33struct act_rule *parse_http_req_cond(const char **args, const char *file, int linenum, struct proxy *proxy);
34struct act_rule *parse_http_res_cond(const char **args, const char *file, int linenum, struct proxy *proxy);
Willy Tarreau61c112a2018-10-02 16:43:32 +020035struct redirect_rule *http_parse_redirect_rule(const char *file, int linenum, struct proxy *curproxy,
36 const char **args, char **errmsg, int use_fmt, int dir);
37
38static inline void http_req_keywords_register(struct action_kw_list *kw_list)
39{
40 LIST_ADDQ(&http_req_keywords.list, &kw_list->list);
41}
42
43static inline void http_res_keywords_register(struct action_kw_list *kw_list)
44{
45 LIST_ADDQ(&http_res_keywords.list, &kw_list->list);
46}
47
Thierry Fournier20ad1362020-11-28 17:40:24 +010048struct action_kw *action_http_req_custom(const char *kw);
49struct action_kw *action_http_res_custom(const char *kw);
Thierry Fournier20ad1362020-11-28 17:40:24 +010050
Willy Tarreau61c112a2018-10-02 16:43:32 +020051#endif /* _PROTO_HTTP_RULES_H */
52
53/*
54 * Local variables:
55 * c-indent-level: 8
56 * c-basic-offset: 8
57 * End:
58 */