From: Guillaume Thouvenin Date: Thu, 20 Oct 2016 14:32:44 +0000 (+0200) Subject: Enable or disable cross-origin resource sharing X-Git-Tag: 2016.12~5^2~15^2 X-Git-Url: https://gerrit.mcp.mirantis.com/gitweb?p=salt-formulas%2Felasticsearch.git;a=commitdiff_plain;h=a4c7ca10a4db4cfe6e85a3065d6f49cc9f1db444 Enable or disable cross-origin resource sharing --- diff --git a/elasticsearch/files/elasticsearch.yml b/elasticsearch/files/elasticsearch.yml index 8268098..4d21261 100644 --- a/elasticsearch/files/elasticsearch.yml +++ b/elasticsearch/files/elasticsearch.yml @@ -253,6 +253,16 @@ http.port: {{ server.bind.port }} # # http.max_content_length: 100mb +# Enable or disable cross-origin resource sharing +{%- if server.get('cors', {}).enabled is defined %} +http.cors.enabled: {{ server.cors.enabled|lower }} +{%- endif %} + +# Which origins to allow. +{%- if server.get('cors', {}).allow_origin is defined %} +http.cors.allow-origin: {{ server.cors.allow_origin }} +{%- endif %} + # Disable HTTP completely: # # http.enabled: false