|
@@ -31,7 +31,7 @@ class ProxyConfig:
|
|
|
template_path: Optional[str] = "haproxy.cfg.tpl"
|
|
template_path: Optional[str] = "haproxy.cfg.tpl"
|
|
|
listen_addr: str = "*"
|
|
listen_addr: str = "*"
|
|
|
listen_port: int = 4242
|
|
listen_port: int = 4242
|
|
|
- template_vars: Dict[str, Any] = field(default_factory=dict)
|
|
|
|
|
|
|
+ template_directives: Optional[Dict[str, List[str]]] = None
|
|
|
|
|
|
|
|
# production mode
|
|
# production mode
|
|
|
production_config_file_path: Optional[str] = None # main config file path
|
|
production_config_file_path: Optional[str] = None # main config file path
|
|
@@ -59,7 +59,7 @@ class ProxyManager:
|
|
|
'listen_port': self.config.listen_port,
|
|
'listen_port': self.config.listen_port,
|
|
|
'backend_host': backend_config.host,
|
|
'backend_host': backend_config.host,
|
|
|
'backend_port': backend_config.port,
|
|
'backend_port': backend_config.port,
|
|
|
- **self.config.template_vars
|
|
|
|
|
|
|
+ 'template_directives': self.config.template_directives,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
try:
|
|
try:
|