diff --git a/hacheck/checker.py b/hacheck/checker.py index 45551a9..4963b4e 100644 --- a/hacheck/checker.py +++ b/hacheck/checker.py @@ -16,8 +16,6 @@ TIMEOUT = 10 -HTTP_HEADERS_TO_COPY = ('Host',) - class Timeout(Exception): pass @@ -84,7 +82,7 @@ def check_http(service_name, port, check_path, io_loop, query_params, headers): if not check_path.startswith("/"): check_path = "/" + check_path # pragma: no cover headers_out = {'User-Agent': 'hastate %s' % (__version__)} - for header in HTTP_HEADERS_TO_COPY: + for header in config.config['http_headers_to_copy']: if header in headers: headers_out[header] = headers[header] if config.config['service_name_header']: diff --git a/hacheck/config.py b/hacheck/config.py index 58e869b..8a3cb77 100644 --- a/hacheck/config.py +++ b/hacheck/config.py @@ -14,7 +14,8 @@ def max_or_int(some_str_value): 'log_path': (str, 'stderr'), 'mysql_username': (str, None), 'mysql_password': (str, None), - 'rlimit_nofile': (max_or_int, None) + 'rlimit_nofile': (max_or_int, None), + 'http_headers_to_copy': (list, ['Host']) }