mirror of https://github.com/omar-polo/gmid.git
add `protocols' option to `proxy' rule
This commit is contained in:
parent
5128c0b0e3
commit
c7c8ef448b
1
gmid.h
1
gmid.h
|
@ -100,6 +100,7 @@ extern struct fcgi fcgi[FCGI_MAX];
|
|||
struct proxy {
|
||||
char *host;
|
||||
const char *port;
|
||||
uint32_t protocols;
|
||||
int noverifyname;
|
||||
uint8_t *cert;
|
||||
size_t certlen;
|
||||
|
|
12
parse.y
12
parse.y
|
@ -309,6 +309,12 @@ proxy_opt : CERT string {
|
|||
if (p->key == NULL)
|
||||
yyerror("can't load key %s", $2);
|
||||
}
|
||||
| PROTOCOLS string {
|
||||
struct proxy *p = &host->proxy;
|
||||
|
||||
if (tls_config_parse_protocols(&p->protocols, $2) == -1)
|
||||
yyerror("invalid protocols string \"%s\"", $2);
|
||||
}
|
||||
| RELAY_TO string {
|
||||
char *at;
|
||||
const char *errstr;
|
||||
|
@ -961,7 +967,11 @@ symget(const char *nam)
|
|||
struct vhost *
|
||||
new_vhost(void)
|
||||
{
|
||||
return xcalloc(1, sizeof(struct vhost));
|
||||
struct vhost *v;
|
||||
|
||||
v = xcalloc(1, sizeof(*v));
|
||||
v->proxy.protocols = TLS_PROTOCOLS_DEFAULT;
|
||||
return v;
|
||||
}
|
||||
|
||||
struct location *
|
||||
|
|
Loading…
Reference in New Issue