Commit 6552b9a8 authored by Bence Romsics's avatar Bence Romsics Committed by Stephen Finucane
Browse files

Make debug option of wsgi server configurable

Because in some deployments tracebacks in API responses are unwanted
for security reasons.

Change-Id: I8a2acea7393c369bfa7d7822f21b4d40d56d6739
Needed-By: https://review.opendev.org/c/openstack/neutron/+/818391
Partial-Bug: #1951429
parent 7a62271d
......@@ -88,6 +88,11 @@ wsgi_opts = [
"If an incoming connection is idle for this number of "
"seconds it will be closed. A value of '0' means "
"wait forever."),
cfg.BoolOpt('wsgi_server_debug',
default=False,
help="True if the server should send exception tracebacks to "
"the clients on 500 errors. If False, the server will "
"respond with empty bodies."),
]
ssl_opts = [
......
......@@ -180,7 +180,7 @@ class Server(service.ServiceBase):
'custom_pool': self._pool,
'log': self._logger,
'log_format': self.conf.wsgi_log_format,
'debug': False,
'debug': self.conf.wsgi_server_debug,
'keepalive': self.conf.wsgi_keep_alive,
'socket_timeout': self.client_socket_timeout
}
......
---
features:
- |
A new config options, ``[DEFAULT] wsgi_server_debug``, has been added.
This allows admins to configure whether the server should send exception
tracebacks to the clients on HTTP 500 errors. This defaults to ``False``,
preserving previous behavior.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment