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
This commit is contained in:
Radosław Piliszek 2020-01-29 21:27:28 +01:00
parent 26c5c8dff6
commit 9a6fcc2ea5
2 changed files with 7 additions and 0 deletions

View File

@ -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")

View File

@ -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