Nginx property proxy-keepalive must be an integer

This commit is contained in:
Ostap Brehin
2025-12-28 10:08:11 +00:00
parent caff2e6b96
commit c84c0208a9
2 changed files with 7 additions and 1 deletions

View File

@@ -338,7 +338,7 @@ Changing these value globally or on a per-app basis will require rebuilding the
| proxy-buffers | `8 8k` | string | Number and size of the buffers used for reading the proxied server response, for a single connection |
| proxy-busy-buffers-size | `16k` | string | Limits the total size of buffers that can be busy sending a response to the client while the response is not yet fully read. |
| proxy-connect-timeout | `60s` | string | Timeout (with units) for establishing a connection to your backend server |
| proxy-keepalive | empty string | string | Number of idle keepalive connections to upstream servers (disabled by default) |
| proxy-keepalive | empty (disabled) | integer | Number of idle keepalive connections to upstream servers (disabled by default) |
| proxy-read-timeout | `60s` | string | Timeout (with units) for reading response from your backend server |
| proxy-send-timeout | `60s` | string | Timeout (with units) for transmitting a request to your backend server |
| send-timeout | `60s` | string | Timeout (with units) for transmitting a response to your the client |

View File

@@ -25,6 +25,12 @@ cmd-nginx-set() {
verify_app_name "$APP"
fi
if [[ "$KEY" == "proxy-keepalive" ]] && [[ -n "$VALUE" ]]; then
if ! is_number "$VALUE"; then
dokku_log_fail "Invalid value for proxy-keepalive: must be an integer"
fi
fi
if [[ -n "$VALUE" ]]; then
dokku_log_info2_quiet "Setting ${KEY} to ${VALUE}"
fn-plugin-property-write "nginx" "$APP" "$KEY" "$VALUE"