Skip to content

Instantly share code, notes, and snippets.

@logan2211
Created October 11, 2017 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save logan2211/32fa5fb0c6e0c2775b14ede5174d6c07 to your computer and use it in GitHub Desktop.
Save logan2211/32fa5fb0c6e0c2775b14ede5174d6c07 to your computer and use it in GitHub Desktop.
Glance CORS configuration for Horizon
---
# Add any URLs used to access Horizon to this list.
openstack_cors_allowed_origin:
- 'https://cloud.lstn.net'
glance_cors_allowed_origin: "{{ openstack_cors_allowed_origin }}"
# TODO(logan): Monitor the need for the allow_headers CORS override based on
# the status of https://bugs.launchpad.net/oslo.middleware/+bug/1680062
glance_glance_api_conf_overrides:
cors:
# Only the first "allow_headers" entry, origin, is an override. See LP bug
# 1680062 for why this is necessary. The rest of the headers are defined in
# glance's code base but must be included to avoid removing them with the
# override.
allow_headers: origin,content-md5,x-image-meta-checksum,x-storage-token,accept-encoding,x-auth-token,x-identity-status,x-roles,x-service-catalog,x-user-id,x-tenant-id,x-openstack-request-id
allowed_origin: "{{ glance_cors_allowed_origin | join(',') }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment