diff --git a/manila/api/middleware/auth.py b/manila/api/middleware/auth.py index b67f99c9e5..6068a9701a 100644 --- a/manila/api/middleware/auth.py +++ b/manila/api/middleware/auth.py @@ -32,6 +32,10 @@ from manila.wsgi import common as base_wsgi use_forwarded_for_opt = cfg.BoolOpt( 'use_forwarded_for', default=False, + deprecated_for_removal=True, + deprecated_reason='This feature is duplicate of the HTTPProxyToWSGI ' + 'middleware of oslo.middleware.', + deprecated_since='Zed', help='Treat X-Forwarded-For as the canonical remote address. ' 'Only enable this if you have a sanitizing proxy.') diff --git a/releasenotes/notes/deprecate-use_forwarded_for-2b47e9b63d5f2fc1.yaml b/releasenotes/notes/deprecate-use_forwarded_for-2b47e9b63d5f2fc1.yaml new file mode 100644 index 0000000000..888c193f50 --- /dev/null +++ b/releasenotes/notes/deprecate-use_forwarded_for-2b47e9b63d5f2fc1.yaml @@ -0,0 +1,7 @@ +--- +deprecations: + - | + The ``[DEFAULT] 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 manila.conf.