Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions content-cache/src/nginx_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions content-cache/tests/unit/test_nginx_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down