Merge "Enable CORS for app-catalog"

This commit is contained in:
Jenkins 2015-07-14 16:48:23 +00:00 committed by Gerrit Code Review
commit 8d9fde0e93
2 changed files with 35 additions and 0 deletions

View File

@ -34,4 +34,36 @@ class apps_site (
vhost_name => $vhost_name,
}
a2mod { 'headers':
ensure => present
}
if ! defined(Package['python-yaml']) {
package { 'python-yaml':
ensure => present,
}
}
exec { 'make_glance_json' :
command => "python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout)' < ${root_dir}/openstack_catalog/web/static/glance_images.yaml > ${root_dir}/openstack_catalog/web/static/glance_images.json",
path => '/usr/local/bin:/usr/bin:/bin',
refreshonly => true,
subscribe => Vcsrepo[$root_dir],
}
exec { 'make_heat_json' :
command => "python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout)' < ${root_dir}/openstack_catalog/web/static/heat_templates.yaml > ${root_dir}/openstack_catalog/web/static/heat_templates.json",
path => '/usr/local/bin:/usr/bin:/bin',
refreshonly => true,
subscribe => Vcsrepo[$root_dir],
}
exec { 'make_murano_json' :
command => "python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout)' < ${root_dir}/openstack_catalog/web/static/murano_apps.yaml > ${root_dir}/openstack_catalog/web/static/murano_apps.json",
path => '/usr/local/bin:/usr/bin:/bin',
refreshonly => true,
subscribe => Vcsrepo[$root_dir],
}
}

View File

@ -11,6 +11,9 @@
Allow from all
Satisfy Any
</Directory>
<Directory <%= @docroot %>/static/>
Header set Access-Control-Allow-Origin "*"
</Directory>
ErrorLog /var/log/apache2/app_site-error.log