aboutsummaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2022-01-01 19:04:50 +0000
committerOmar Polo <op@omarpolo.com>2022-01-01 19:04:50 +0000
commitc7c8ef448bc8832998606ec217907c7dc66fec6c (patch)
tree2d935588f4ba9c3a4dac7a8cc0f028ea1c6351ee /parse.y
parent5128c0b0e3b51737783c4c68c9e34a76ec8c8b0e (diff)
add `protocols' option to `proxy' rule
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y12
1 files changed, 11 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index d215006..6359227 100644
--- a/parse.y
+++ b/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 *