Willy Tarreau | 61c112a | 2018-10-02 16:43:32 +0200 | [diff] [blame] | 1 | /* |
| 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 | |
Willy Tarreau | 4c7e4b7 | 2020-05-27 12:58:42 +0200 | [diff] [blame] | 25 | #include <haproxy/api.h> |
Willy Tarreau | 853b297 | 2020-05-27 18:01:47 +0200 | [diff] [blame] | 26 | #include <haproxy/list.h> |
Willy Tarreau | 122eba9 | 2020-06-04 10:15:32 +0200 | [diff] [blame^] | 27 | #include <haproxy/action-t.h> |
Willy Tarreau | 61c112a | 2018-10-02 16:43:32 +0200 | [diff] [blame] | 28 | #include <types/proxy.h> |
| 29 | |
| 30 | extern struct action_kw_list http_req_keywords; |
| 31 | extern struct action_kw_list http_res_keywords; |
Christopher Faulet | 6d0c3df | 2020-01-22 09:26:35 +0100 | [diff] [blame] | 32 | extern struct action_kw_list http_after_res_keywords; |
Willy Tarreau | 61c112a | 2018-10-02 16:43:32 +0200 | [diff] [blame] | 33 | |
| 34 | struct act_rule *parse_http_req_cond(const char **args, const char *file, int linenum, struct proxy *proxy); |
| 35 | struct act_rule *parse_http_res_cond(const char **args, const char *file, int linenum, struct proxy *proxy); |
Christopher Faulet | 6d0c3df | 2020-01-22 09:26:35 +0100 | [diff] [blame] | 36 | struct act_rule *parse_http_after_res_cond(const char **args, const char *file, int linenum, struct proxy *proxy); |
Willy Tarreau | 61c112a | 2018-10-02 16:43:32 +0200 | [diff] [blame] | 37 | struct redirect_rule *http_parse_redirect_rule(const char *file, int linenum, struct proxy *curproxy, |
| 38 | const char **args, char **errmsg, int use_fmt, int dir); |
| 39 | |
| 40 | static inline void http_req_keywords_register(struct action_kw_list *kw_list) |
| 41 | { |
| 42 | LIST_ADDQ(&http_req_keywords.list, &kw_list->list); |
| 43 | } |
| 44 | |
| 45 | static inline void http_res_keywords_register(struct action_kw_list *kw_list) |
| 46 | { |
| 47 | LIST_ADDQ(&http_res_keywords.list, &kw_list->list); |
| 48 | } |
| 49 | |
Christopher Faulet | 6d0c3df | 2020-01-22 09:26:35 +0100 | [diff] [blame] | 50 | static inline void http_after_res_keywords_register(struct action_kw_list *kw_list) |
| 51 | { |
| 52 | LIST_ADDQ(&http_after_res_keywords.list, &kw_list->list); |
| 53 | } |
| 54 | |
Willy Tarreau | 61c112a | 2018-10-02 16:43:32 +0200 | [diff] [blame] | 55 | #endif /* _PROTO_HTTP_RULES_H */ |
| 56 | |
| 57 | /* |
| 58 | * Local variables: |
| 59 | * c-indent-level: 8 |
| 60 | * c-basic-offset: 8 |
| 61 | * End: |
| 62 | */ |