|
...
|
...
|
@@ -150,6 +150,13 @@ function configure_glance {
|
|
150
|
150
|
|
|
151
|
151
|
iniset $GLANCE_API_CONF DEFAULT workers "$API_WORKERS"
|
|
152
|
152
|
|
|
|
153
|
+ # CORS feature support - to allow calls from Horizon by default
|
|
|
154
|
+ if [ -n "$GLANCE_CORS_ALLOWED_ORIGIN" ]; then
|
|
|
155
|
+ iniset $GLANCE_API_CONF cors allowed_origin "$GLANCE_CORS_ALLOWED_ORIGIN"
|
|
|
156
|
+ else
|
|
|
157
|
+ iniset $GLANCE_API_CONF cors allowed_origin "http://$SERVICE_HOST"
|
|
|
158
|
+ fi
|
|
|
159
|
+
|
|
153
|
160
|
# Store the images in swift if enabled.
|
|
154
|
161
|
if is_service_enabled s-proxy; then
|
|
155
|
162
|
iniset $GLANCE_API_CONF glance_store default_store swift
|