From 9a6fcc2ea52f38ab971551734244e45a91e5b074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Piliszek?= Date: Wed, 29 Jan 2020 21:27:28 +0100 Subject: [PATCH] Use default cors config also when run as wsgi app This fixes Glance CORS behind uWSGI as used in devstack. Change-Id: If82d9b396afd87c65e035868b595ff5683cb19f6 Closes-bug: #1861334 --- glance/common/wsgi_app.py | 1 + releasenotes/notes/bug-1861334-ebc2026b85675d47.yaml | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 releasenotes/notes/bug-1861334-ebc2026b85675d47.yaml diff --git a/glance/common/wsgi_app.py b/glance/common/wsgi_app.py index e505e14c75..51a92e2737 100644 --- a/glance/common/wsgi_app.py +++ b/glance/common/wsgi_app.py @@ -65,6 +65,7 @@ def _setup_os_profiler(): def init_app(): + config.set_config_defaults() config_files = _get_config_files() CONF([], project='glance', default_config_files=config_files) logging.setup(CONF, "glance") diff --git a/releasenotes/notes/bug-1861334-ebc2026b85675d47.yaml b/releasenotes/notes/bug-1861334-ebc2026b85675d47.yaml new file mode 100644 index 0000000000..f57542e4ca --- /dev/null +++ b/releasenotes/notes/bug-1861334-ebc2026b85675d47.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Bug 1861334_: cors config defaults not used when Glance is run as WSGI app + + .. _1861334: https://bugs.launchpad.net/glance/+bug/1861334