From b24fc87a1d26ce3447c5fc914f55fb199a2b7702 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 4 Apr 2022 00:27:42 +0900 Subject: [PATCH] Deprecate [DEFAULT] use_forwarded_for ... because functionality of this parameter is effectively duplicate of the HTTPProxyToWSGI middleware in oslo.middleware library. Closes-Bug: #1967686 Change-Id: I4db615093b739c7ff582f348a6fb6eabb8068257 --- manila/api/middleware/auth.py | 4 ++++ .../deprecate-use_forwarded_for-2b47e9b63d5f2fc1.yaml | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 releasenotes/notes/deprecate-use_forwarded_for-2b47e9b63d5f2fc1.yaml 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.