roles/nginx: Only check WordPress variables is vhost is using WordPress

This variable is used to control the FastCGI cache, and doesn't
need to be checked if the vhost isn't using WordPress.
This commit is contained in:
Alan Orth 2016-09-12 20:57:10 +03:00
parent d4ffc28d62
commit e036349661
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -91,6 +91,7 @@ server {
include extra-security.conf;
}
{% if has_wordpress == True %}
# Check if a user is logged in
# if so, set $wordpress_logged_in = 1
# otherwise, set $wordpress_logged_in = 0
@ -102,3 +103,4 @@ map $http_cookie $wordpress_logged_in {
~wordpress_logged_in 1;
}
{% endif %}