diff options
author | Zuul <zuul@review.opendev.org> | 2022-04-25 19:39:53 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2022-04-25 19:39:53 +0000 |
commit | 56b5aed08c6a3ed81b78dc216f0165ebfe3c3350 (patch) | |
tree | 1a6c0a0ef7b41bce4bf418d63894b1c6aa12c39b | |
parent | 03fd208c562214476019ff2d7cc38f95c06e1348 (diff) | |
parent | cf906cdcc25c112956f56f9fb9f62b2cfdeacc65 (diff) | |
download | nova-56b5aed08c6a3ed81b78dc216f0165ebfe3c3350.tar.gz |
Merge "Deprecate [api] use_forwarded_for"
-rw-r--r-- | etc/nova/api-paste.ini | 2 | ||||
-rw-r--r-- | nova/conf/api.py | 4 | ||||
-rw-r--r-- | releasenotes/notes/deprecate-use_forwarded_for-f7b24eaf130782b9.yaml | 12 |
3 files changed, 17 insertions, 1 deletions
diff --git a/etc/nova/api-paste.ini b/etc/nova/api-paste.ini index 7e20eaa7e2..b73a9fea39 100644 --- a/etc/nova/api-paste.ini +++ b/etc/nova/api-paste.ini @@ -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 diff --git a/nova/conf/api.py b/nova/conf/api.py index 898741c7f5..5c8a367e8e 100644 --- a/nova/conf/api.py +++ b/nova/conf/api.py @@ -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. diff --git a/releasenotes/notes/deprecate-use_forwarded_for-f7b24eaf130782b9.yaml b/releasenotes/notes/deprecate-use_forwarded_for-f7b24eaf130782b9.yaml new file mode 100644 index 0000000000..4068fedf6a --- /dev/null +++ b/releasenotes/notes/deprecate-use_forwarded_for-f7b24eaf130782b9.yaml @@ -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. |