From 7b28ddc8b9678727c4e7e4e247f64a6f03693200 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 28 Jul 2021 12:27:51 +0200 Subject: [PATCH] nginx virtualhost: handle the cors settings. --- defaults/main.yml | 2 ++ vars/main.yml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 00f2dc5..24611ea 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -37,6 +37,8 @@ redmine_nginx_behind_haproxy_settings: False redmine_nginx_frontend: True redmine_nginx_static_data_valid_time: '30d' nginx_virthosts: '{{ redmine_nginx_virthosts }}' +redmine_nginx_cors_enabled: False +redmine_nginx_cors_global: '{{ redmine_nginx_cors_enabled }}' redmine_nginx_serveraliases: [] redmine_log_level: warn diff --git a/vars/main.yml b/vars/main.yml index 842a61a..7ba8a0f 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -53,6 +53,8 @@ nginx_frontend: '{{ redmine_nginx_frontend }}' nginx_use_common_virthost: False nginx_webroot: '{{ redmine_web_root }}' nginx_behind_haproxy_settings: '{{ redmine_nginx_behind_haproxy_settings }}' +nginx_cors_enabled: '{{ redmine_nginx_cors_enabled }}' +nginx_cors_global: '{{ redmine_nginx_cors_global }}' redmine_nginx_virthosts: - virthost_name: '{{ ansible_fqdn }}' listen: '{{ http_port }}' @@ -70,3 +72,4 @@ redmine_nginx_virthosts: locations: - location: '@app' target: http://unicorn + cors: '{{ nginx_cors_enabled }}'