Skip to content

Commit

Permalink
Move add_header directive for X-Cache-Enabled to server-block to …
Browse files Browse the repository at this point in the history
…avoid clearing all `location` headers.
  • Loading branch information
strarsis committed Aug 4, 2024
1 parent 329db48 commit 661c9a6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions roles/wordpress-setup/templates/wordpress-site.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ server {
index index.php index.htm index.html;
add_header Fastcgi-Cache $upstream_cache_status;

# Additional proxy header for WordPress (notably its Site Health check)
add_header X-Cache-Enabled $loopback_header_x_cache_enabled;

# Specify a charset
charset utf-8;

Expand Down Expand Up @@ -239,8 +242,6 @@ server {
{% block location_php_basic -%}
try_files $uri /index.php;

# Additional proxy header for WordPress (notably its Site Health check)
add_header X-Cache-Enabled $loopback_header_x_cache_enabled;
{% endblock -%}

{% block cache_config -%}
Expand Down

0 comments on commit 661c9a6

Please sign in to comment.