Deprecate [api] use_forwarded_for

... because functionality of this parameter is effectively duplicate of
the HTTPProxyToWSGI middleware in oslo.middleware library.

Closes-Bug: #1967686
Change-Id: Ifebcfb6b5c1594c075bb9c152a06aa7af7c61bc8
This commit is contained in:
Takashi Kajinami 2022-04-04 00:43:18 +09:00
parent b0851b0e9c
commit cf906cdcc2
3 changed files with 17 additions and 1 deletions

View File

@ -6,7 +6,7 @@ use = egg:Paste#urlmap
/: meta
[pipeline:meta]
pipeline = cors metaapp
pipeline = cors http_proxy_to_wsgi metaapp
[app:metaapp]
paste.app_factory = nova.api.metadata.handler:MetadataRequestHandler.factory

View File

@ -42,7 +42,11 @@ Determine the strategy to use for authentication.
"""),
cfg.BoolOpt("use_forwarded_for",
default=False,
deprecated_for_removal=True,
deprecated_reason='This feature is duplicate of the HTTPProxyToWSGI '
'middleware in oslo.middleware',
deprecated_group="DEFAULT",
deprecated_since='26.0.0',
help="""
When True, the 'X-Forwarded-For' header is treated as the canonical remote
address. When False (the default), the 'remote_address' header is used.

View File

@ -0,0 +1,12 @@
---
upgrade:
- |
The default ``api-paste.ini`` file has been updated and now the Metadata
API pipeline includes the ``HTTPProxyToWSGI`` middleware.
deprecations:
- |
The ``[api] use_forwarded_for`` parameter has been deprecated. Instead of
using this parameter, add the ``HTTPProxyToWSGI`` middleware to api
pipelines, and ``[oslo_middleware] enable_proxy_headers_parsing = True``
to nova.conf.