forked from ISTI-ansible-roles/ansible-roles
Change the smartgears nginx virtualhost to be compatible with the new CORS configuration.
This commit is contained in:
parent
032f49040a
commit
db61e24d4e
|
@ -65,8 +65,10 @@ server {
|
|||
location /{{ context }} {
|
||||
{% if smartgears_nginx_cors_enabled %}
|
||||
include /etc/nginx/snippets/nginx-cors.conf;
|
||||
{% endif %}
|
||||
proxy_pass http://localhost:{{ item.http_port }};
|
||||
{% else %}
|
||||
proxy_pass http://localhost:{{ item.http_port }}/{{ context }};
|
||||
{% endif %}
|
||||
}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -101,9 +103,6 @@ server {
|
|||
|
||||
{% else %}
|
||||
location / {
|
||||
{% if smartgears_nginx_cors_enabled %}
|
||||
include /etc/nginx/snippets/nginx-cors.conf;
|
||||
{% endif %}
|
||||
return 301 https://{{ item.servername }}$request_uri;
|
||||
}
|
||||
{% endif %}
|
||||
|
@ -178,8 +177,10 @@ server {
|
|||
location /{{ context }} {
|
||||
{% if smartgears_nginx_cors_enabled %}
|
||||
include /etc/nginx/snippets/nginx-cors.conf;
|
||||
{% endif %}
|
||||
proxy_pass http://localhost:{{ item.http_port }};
|
||||
{% else %}
|
||||
proxy_pass http://localhost:{{ item.http_port }}/{{ context }};
|
||||
{% endif %}
|
||||
}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue