From 5bc252de44343f0fd38782f9be5a89fbdef28f8b Mon Sep 17 00:00:00 2001 From: Damian Dabrowski Date: Thu, 20 Oct 2022 19:05:49 +0200 Subject: [PATCH] Add external_lb_vip_address to glance_cors_allowed_origin by default Since ``horizon_images_upload_mode`` is enabled by default and ``glance_show_multiple_locations`` is disabled by default(turns out it's not really required), we should add ``external_lb_vip_address`` to ``glance_cors_allowed_origin`` as default. Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/862167 Change-Id: I6d13e1e985f8e3bbb97b0af7063b469cb4b2dbca --- defaults/main.yml | 2 +- .../notes/glance_cors_allowed_origin-fe355eb93169cf13.yaml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/glance_cors_allowed_origin-fe355eb93169cf13.yaml diff --git a/defaults/main.yml b/defaults/main.yml index 73d6e9ca..57de4dca 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -195,7 +195,7 @@ glance_image_cache_max_size: 10737418240 glance_image_cache_stall_time: 86400 # CORS options -glance_cors_allowed_origin: "{{ (glance_show_multiple_locations | bool) | ternary(openstack_service_publicuri_proto | default('http') + '://' + external_lb_vip_address, None) }}" +glance_cors_allowed_origin: "{{ openstack_service_publicuri_proto | default('http') + '://' + external_lb_vip_address }}" # If ``glance_api_workers`` is unset the system will use half the number of available VCPUS to # compute the number of api workers to use. # glance_api_workers: 16 diff --git a/releasenotes/notes/glance_cors_allowed_origin-fe355eb93169cf13.yaml b/releasenotes/notes/glance_cors_allowed_origin-fe355eb93169cf13.yaml new file mode 100644 index 00000000..a15f6044 --- /dev/null +++ b/releasenotes/notes/glance_cors_allowed_origin-fe355eb93169cf13.yaml @@ -0,0 +1,5 @@ +--- +other: + - | + ``external_lb_vip_address`` was added to the default value for + ``glance_cors_allowed_origin`` regardless of other variables.