This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/master by this push:
new a0de241 Ansible: allow setting custom HTTP headers on Aliases
new ebdd083 Merge branch 'vhost-alias-cors-headers'
a0de241 is described below
commit a0de241225cf0b1d7e66482cccd4adc53978ae5b
Author: Marcus Christie <[email protected]>
AuthorDate: Tue Jul 6 16:09:05 2021 -0400
Ansible: allow setting custom HTTP headers on Aliases
---
.../ansible/inventories/scigap/production/host_vars/immune/vars.yml | 3 +++
.../ansible/inventories/scigap/production/host_vars/regsnps/vars.yml | 3 +++
dev-tools/ansible/roles/django/templates/django-ssl-vhost.conf.j2 | 3 +++
dev-tools/ansible/roles/django/templates/django-vhost.conf.j2 | 3 +++
4 files changed, 12 insertions(+)
diff --git
a/dev-tools/ansible/inventories/scigap/production/host_vars/immune/vars.yml
b/dev-tools/ansible/inventories/scigap/production/host_vars/immune/vars.yml
index 8a4e024..d892f8a 100644
--- a/dev-tools/ansible/inventories/scigap/production/host_vars/immune/vars.yml
+++ b/dev-tools/ansible/inventories/scigap/production/host_vars/immune/vars.yml
@@ -30,6 +30,9 @@ vhost_ssl: True
vhost_aliases:
- url: /data/
path: "{{ user_data_dir }}/regsnps/regsnps-data/"
+ headers:
+ - name: "Access-Control-Allow-Origin"
+ value: '"*"'
ssl_certificate_file:
"/etc/letsencrypt/live/immuneportal.ccbb.iupui.edu/cert.pem"
ssl_certificate_chain_file:
"/etc/letsencrypt/live/immuneportal.ccbb.iupui.edu/fullchain.pem"
ssl_certificate_key_file:
"/etc/letsencrypt/live/immuneportal.ccbb.iupui.edu/privkey.pem"
diff --git
a/dev-tools/ansible/inventories/scigap/production/host_vars/regsnps/vars.yml
b/dev-tools/ansible/inventories/scigap/production/host_vars/regsnps/vars.yml
index d3ff111..5ce8bfc 100644
--- a/dev-tools/ansible/inventories/scigap/production/host_vars/regsnps/vars.yml
+++ b/dev-tools/ansible/inventories/scigap/production/host_vars/regsnps/vars.yml
@@ -30,6 +30,9 @@ vhost_ssl: True
vhost_aliases:
- url: /data/
path: "{{ user_data_dir }}/regsnps/regsnps-data/"
+ headers:
+ - name: "Access-Control-Allow-Origin"
+ value: '"*"'
ssl_certificate_file: "/etc/letsencrypt/live/regsnps.ccbb.iupui.edu/cert.pem"
ssl_certificate_chain_file:
"/etc/letsencrypt/live/regsnps.ccbb.iupui.edu/fullchain.pem"
ssl_certificate_key_file:
"/etc/letsencrypt/live/regsnps.ccbb.iupui.edu/privkey.pem"
diff --git a/dev-tools/ansible/roles/django/templates/django-ssl-vhost.conf.j2
b/dev-tools/ansible/roles/django/templates/django-ssl-vhost.conf.j2
index 3e6e4b7..172e493 100644
--- a/dev-tools/ansible/roles/django/templates/django-ssl-vhost.conf.j2
+++ b/dev-tools/ansible/roles/django/templates/django-ssl-vhost.conf.j2
@@ -61,6 +61,9 @@
Alias "{{ alias.url }}" "{{ alias.path }}"
<Directory "{{ alias.path }}">
Require all granted
+ {% for header in alias.headers %}
+ Header set {{ header.name }} {{ header.value }}
+ {% endfor %}
</Directory>
{% endfor %}
diff --git a/dev-tools/ansible/roles/django/templates/django-vhost.conf.j2
b/dev-tools/ansible/roles/django/templates/django-vhost.conf.j2
index dd9b271..177e9aa 100644
--- a/dev-tools/ansible/roles/django/templates/django-vhost.conf.j2
+++ b/dev-tools/ansible/roles/django/templates/django-vhost.conf.j2
@@ -52,6 +52,9 @@
Alias "{{ alias.url }}" "{{ alias.path }}"
<Directory "{{ alias.path }}">
Require all granted
+ {% for header in alias.headers %}
+ Header set {{ header.name }} {{ header.value }}
+ {% endfor %}
</Directory>
{% endfor %}