From f6b8b59e9a2732920b19d57f3df1fff27d1da8b7 Mon Sep 17 00:00:00 2001 From: Justin Geibel Date: Tue, 24 Dec 2019 20:46:08 -0500 Subject: [PATCH] Fix fastboot check in nginx erb template In production we're currently returning a 502 Bad Gateway for `/policies`. I intend to merge this and deploy to production shortly. This bug was introduced in #1907. The bad check always evaluated to true. An explicit check for an empty string is added as well. I've tested this locally with `erb` and different values and the generated configuration is now working correctly. --- config/nginx.conf.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/nginx.conf.erb b/config/nginx.conf.erb index 3435fc6dc4a..9a62e8499f8 100644 --- a/config/nginx.conf.erb +++ b/config/nginx.conf.erb @@ -141,7 +141,7 @@ http { location / { proxy_pass http://localhost:9000; } - <% elsif ['USE_FASTBOOT'] %> + <% elsif ENV['USE_FASTBOOT'] && !ENV['USE_FASTBOOT'].empty? %> # Fastboot is enabled only for allowed paths location = /policies {