X-Git-Url: https://gerrit.mcp.mirantis.com/gitweb?p=salt-formulas%2Felasticsearch.git;a=blobdiff_plain;f=elasticsearch%2Ffiles%2Felasticsearch.yml;h=4d212610dcc4c656779497e5fabb688326676623;hp=82680988554fa0f306854b86b36184a84b9374d1;hb=3762da9211ecc8b0fcbb57df0ae996af9b76de57;hpb=3a90b568a1ba6baeac991736f51355227c609c07;ds=sidebyside 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