diff options
author | Omar Polo <op@omarpolo.com> | 2022-01-02 16:33:28 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2022-01-02 16:33:28 +0000 |
commit | b7967bc1f695126e1bf2705bfd486bbc32aaf8b0 (patch) | |
tree | d24f103eb78223a61049bfcebedb1686bd628c3c /gmid.h | |
parent | e2f167afb3444d3ba55fdffe234ef7812cac72f0 (diff) |
proxy: allow multiple proxy blocks, matching options and validations
as a side effect the order of the content of a server block is relaxed:
options, location or proxy blocks can be put in any order.
Diffstat (limited to 'gmid.h')
-rw-r--r-- | gmid.h | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -97,7 +97,12 @@ struct fcgi { }; extern struct fcgi fcgi[FCGI_MAX]; +TAILQ_HEAD(proxyhead, proxy); struct proxy { + char *match_proto; + char *match_host; + const char *match_port; + char *host; const char *port; int notls; @@ -107,6 +112,8 @@ struct proxy { size_t certlen; uint8_t *key; size_t keylen; + + TAILQ_ENTRY(proxy) proxies; }; TAILQ_HEAD(lochead, location); @@ -163,7 +170,7 @@ struct vhost { struct envhead env; struct envhead params; struct aliashead aliases; - struct proxy proxy; + struct proxyhead proxies; }; struct etm { /* extension to mime */ @@ -229,6 +236,7 @@ struct client { struct bufferevent *cgibev; + struct proxy *proxy; struct bufferevent *proxybev; struct tls *proxyctx; struct event proxyev; |