Fix wrong attribute to find remote address

The webob.Request class does not have the remote_address attribute but
the remote_addr attribute. This change fixes usage of the non-existing
attribute accordingly.

Closes-Bug: #1967683
Change-Id: I233d706d49c795e67f4cdb32ff7ef3e9cdd36b00
This commit is contained in:
Takashi Kajinami 2022-04-04 00:11:49 +09:00
parent 3d3b06179a
commit 90abed0a44
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ def pipeline_factory(loader, global_conf, **local_conf):
def _set_request_context(req, **kwargs):
"""Sets request context based on parameters and request."""
remote_address = getattr(req, 'remote_address', '127.0.0.1')
remote_address = getattr(req, 'remote_addr', '127.0.0.1')
service_catalog = None
if req.headers.get('X_SERVICE_CATALOG') is not None: