From 5d48410d0ab72c5eba80c4034f19f3ae20a76de3 Mon Sep 17 00:00:00 2001 From: Joshua Cornutt Date: Sun, 28 Jan 2024 17:12:44 +0100 Subject: [PATCH] Fixing skipped default override for CORS options Some of the cores middleware options should have overridden default values but the override method was not actually called so the library defaults are still used. Closes-Bug: #2051691 Change-Id: I8dac03c787bf729c60c2e0ecc9c03b7ba9a5b5a5 --- manila/cmd/api.py | 1 + manila/wsgi/wsgi.py | 1 + .../bug-2051691-cors-defaults-15989a221a9cb920.yaml | 9 +++++++++ 3 files changed, 11 insertions(+) create mode 100644 releasenotes/notes/bug-2051691-cors-defaults-15989a221a9cb920.yaml diff --git a/manila/cmd/api.py b/manila/cmd/api.py index fd8224488b..76e4687e18 100644 --- a/manila/cmd/api.py +++ b/manila/cmd/api.py @@ -48,6 +48,7 @@ def main(): CONF(sys.argv[1:], project='manila', version=version.version_string()) config.verify_share_protocols() + config.set_lib_defaults() log.setup(CONF, "manila") utils.monkey_patch() diff --git a/manila/wsgi/wsgi.py b/manila/wsgi/wsgi.py index 46bf1686ab..4a9e37203d 100644 --- a/manila/wsgi/wsgi.py +++ b/manila/wsgi/wsgi.py @@ -35,6 +35,7 @@ def initialize_application(): gmr_opts.set_defaults(CONF) CONF(sys.argv[1:], project="manila", version=version.version_string()) config.verify_share_protocols() + config.set_lib_defaults() log.setup(CONF, "manila") gmr.TextGuruMeditation.setup_autorun(version, conf=CONF) diff --git a/releasenotes/notes/bug-2051691-cors-defaults-15989a221a9cb920.yaml b/releasenotes/notes/bug-2051691-cors-defaults-15989a221a9cb920.yaml new file mode 100644 index 0000000000..06567a298e --- /dev/null +++ b/releasenotes/notes/bug-2051691-cors-defaults-15989a221a9cb920.yaml @@ -0,0 +1,9 @@ +--- +fixes: + - | + `bug 2051691 `_: Fixed + the default values of the following options. + + - ``[cors] allowed_headers`` + - ``[cors] expose_headers`` + - ``[cors] allow_methods``