diff --git a/plugins/nginx-vhosts/src/nginx-property/nginx-property.go b/plugins/nginx-vhosts/src/nginx-property/nginx-property.go index ce61ef4ae..74f9e09a9 100644 --- a/plugins/nginx-vhosts/src/nginx-property/nginx-property.go +++ b/plugins/nginx-vhosts/src/nginx-property/nginx-property.go @@ -184,9 +184,9 @@ func globalValue(appName string, property string) string { case "bind-address-ipv6": value = nginx_vhosts.GlobalBindAddressIPv6() case "client-body-timeout": - value = nginx_vhosts.ComputedClientBodyTimeout(appName) + value = nginx_vhosts.GlobalClientBodyTimeout() case "client-header-timeout": - value = nginx_vhosts.ComputedClientHeaderTimeout(appName) + value = nginx_vhosts.GlobalClientHeaderTimeout() case "client-max-body-size": value = nginx_vhosts.GlobalClientMaxBodySize() case "disable-custom-config": @@ -202,9 +202,9 @@ func globalValue(appName string, property string) string { case "hsts": value = nginx_vhosts.GlobalHSTS() case "keepalive-timeout": - value = nginx_vhosts.ComputedKeepaliveTimeout(appName) + value = nginx_vhosts.GlobalKeepaliveTimeout() case "lingering-timeout": - value = nginx_vhosts.ComputedLingeringTimeout(appName) + value = nginx_vhosts.GlobalLingeringTimeout() case "nginx-conf-sigil-path": value = nginx_vhosts.GlobalNginxConfSigilPath() case "nginx-service-command": diff --git a/tests/unit/nginx-vhosts_properties.bats b/tests/unit/nginx-vhosts_properties.bats index 114d0917c..0830a887f 100644 --- a/tests/unit/nginx-vhosts_properties.bats +++ b/tests/unit/nginx-vhosts_properties.bats @@ -27,7 +27,7 @@ assert_nginx_property_set_get() { run /bin/bash -c "dokku nginx:set --global $prop" assert_success - run /bin/bash -c "dokku nginx:set --global $prop $global_value" + run /bin/bash -c "dokku nginx:set --global $prop '$global_value'" assert_success run /bin/bash -c "dokku --quiet nginx:report $TEST_APP --format json | jq -r '.\"global-$prop\"'" @@ -38,7 +38,7 @@ assert_nginx_property_set_get() { assert_success assert_output "$global_value" - run /bin/bash -c "dokku nginx:set $TEST_APP $prop $app_value" + run /bin/bash -c "dokku nginx:set $TEST_APP $prop '$app_value'" assert_success run /bin/bash -c "dokku --quiet nginx:report $TEST_APP --format json | jq -r '.\"$prop\"'" @@ -99,5 +99,5 @@ assert_nginx_property_set_get() { @test "(nginx:report) misc properties raw/global/computed" { assert_nginx_property_set_get "disable-custom-config" "false" "true" assert_nginx_property_set_get "underscore-in-headers" "on" "off" - assert_nginx_property_set_get "proxy-keepalive" "on" "off" + assert_nginx_property_set_get "proxy-keepalive" "8" "16" }