diff --git a/content-cache/src/nginx_manager.py b/content-cache/src/nginx_manager.py index ea86fac4..bcc7170a 100644 --- a/content-cache/src/nginx_manager.py +++ b/content-cache/src/nginx_manager.py @@ -514,6 +514,7 @@ def _get_location_config_keys( keys = [ nginx.Key("proxy_pass", f"{config.protocol.value}://{upstream}{config.backends_path}"), nginx.Key("proxy_set_header", f'Host "{host}"'), + nginx.Key("proxy_cache_revalidate", "on"), ] for cache_valid in config.proxy_cache_valid: diff --git a/content-cache/tests/unit/test_nginx_manager.py b/content-cache/tests/unit/test_nginx_manager.py index d0db6f66..a75ff325 100644 --- a/content-cache/tests/unit/test_nginx_manager.py +++ b/content-cache/tests/unit/test_nginx_manager.py @@ -96,6 +96,7 @@ def test_update_config_with_valid_config(monkeypatch, patch_nginx_manager: None) assert "server_name example.com" in config_file_content assert "access_log" in config_file_content assert "error_log" in config_file_content + assert "proxy_cache_revalidate on" in config_file_content healthchecks_config_file_content = nginx_manager.NGINX_HEALTHCHECKS_CONF_PATH.read_text() assert "GET /health" in healthchecks_config_file_content