Expose the Gunicorn limit_request_line parameter in the container, with the default set to the maximum 8190.

See #5390.
This commit is contained in:
Dave Page 2022-10-03 14:09:25 +01:00
parent b8ec021a07
commit 992dff64af
3 changed files with 12 additions and 2 deletions

View File

@ -115,6 +115,15 @@ Override the default file path for the server definition list. See the
Specify an output file in which to store the Gunicorn access logs, instead of
sending them to stdout.
**GUNICORN_LIMIT_REQUEST_LINE**
*Default: 8190*
Set the maximum size of HTTP request line in bytes. By default the pgAdmin
container uses the maximum limited size offered by Gunicorn as some requests
can be quite large. In exceptional cases this value can be set to 0 (zero) to
specify "unlimited", however this poses a potential denial of service hazard.
**GUNICORN_THREADS**
*Default: 25*

View File

@ -17,6 +17,7 @@ New features
| `Issue #4994 <https://github.com/pgadmin-org/pgadmin4/issues/4994>`_ - Allow reordering table columns using drag and drop in ERD Tool.
| `Issue #5304 <https://github.com/pgadmin-org/pgadmin4/issues/5304>`_ - Added high availability options to AWS deployment.
| `Issue #5390 <https://github.com/pgadmin-org/pgadmin4/issues/5390>`_ - Expose the Gunicorn limit_request_line parameter in the container, with the default set to the maximum 8190.
Housekeeping
************

View File

@ -90,7 +90,7 @@ TIMEOUT=$(cd /pgadmin4 && /venv/bin/python3 -c 'import config; print(config.SESS
# Using --threads to have multi-threaded single-process worker
if [ -n "${PGADMIN_ENABLE_TLS}" ]; then
exec /venv/bin/gunicorn --timeout "${TIMEOUT}" --bind "${PGADMIN_LISTEN_ADDRESS:-[::]}:${PGADMIN_LISTEN_PORT:-443}" -w 1 --threads "${GUNICORN_THREADS:-25}" --access-logfile "${GUNICORN_ACCESS_LOGFILE:--}" --keyfile /certs/server.key --certfile /certs/server.cert -c gunicorn_config.py run_pgadmin:app
exec /venv/bin/gunicorn --limit-request-line "${GUNICORN_LIMIT_REQUEST_LINE:-8190}" --timeout "${TIMEOUT}" --bind "${PGADMIN_LISTEN_ADDRESS:-[::]}:${PGADMIN_LISTEN_PORT:-443}" -w 1 --threads "${GUNICORN_THREADS:-25}" --access-logfile "${GUNICORN_ACCESS_LOGFILE:--}" --keyfile /certs/server.key --certfile /certs/server.cert -c gunicorn_config.py run_pgadmin:app
else
exec /venv/bin/gunicorn --timeout "${TIMEOUT}" --bind "${PGADMIN_LISTEN_ADDRESS:-[::]}:${PGADMIN_LISTEN_PORT:-80}" -w 1 --threads "${GUNICORN_THREADS:-25}" --access-logfile "${GUNICORN_ACCESS_LOGFILE:--}" -c gunicorn_config.py run_pgadmin:app
exec /venv/bin/gunicorn --limit-request-line "${GUNICORN_LIMIT_REQUEST_LINE:-8190}" --timeout "${TIMEOUT}" --bind "${PGADMIN_LISTEN_ADDRESS:-[::]}:${PGADMIN_LISTEN_PORT:-80}" -w 1 --threads "${GUNICORN_THREADS:-25}" --access-logfile "${GUNICORN_ACCESS_LOGFILE:--}" -c gunicorn_config.py run_pgadmin:app
fi