Add config options for cors config

With newer ES we need to set CORS controls properly because it seems to
care about that now. This change allows you to enable the use of CORS
and specify which origins are allowed.

By default ES doesn't allow any cross origin requests so you have to
explicitly enable it with these options if you want to allow it.

Change-Id: I0aa8d5167c770c1024b7596da582d6cc089b1b47
This commit is contained in:
Clark Boylan 2015-11-12 09:54:32 -08:00
parent a111864fd2
commit bbd742c992
1 changed files with 7 additions and 0 deletions

View File

@ -263,6 +263,13 @@ bootstrap.mlockall: <%= @es_template_config['bootstrap.mlockall'] %>
#
# http.enabled: false
<% if es_template_config.has_key?('http.cors.enabled') then -%>
http.cors.enabled: <%= es_template_config['http.cors.enabled'] %>
<% end -%>
<% if es_template_config.has_key?('http.cors.allow-origin') then -%>
http.cors.allow-origin: <%= es_template_config['http.cors.allow-origin'] %>
<% end -%>
################################### Gateway ###################################