diff --git a/roles/web_server/templates/nginx-default.j2 b/roles/web_server/templates/nginx-default.j2 index 89711a3b278fc3d6ecea3fb6134e0105969d2b44..d2b3025423318d75d6e44214fb644ba381b6917d 100644 --- a/roles/web_server/templates/nginx-default.j2 +++ b/roles/web_server/templates/nginx-default.j2 @@ -35,4 +35,11 @@ server { # Always point user to the same index page. try_files $uri /index.html; } + + {% if environment_indicator -%} + # Show environment indicator on HTML pages. + sub_filter_types text/html; + sub_filter_once on; + sub_filter "" "
{{ environment_indicator.text }}
"; + {% endif -%} }