From d022a4495f0580b299a4633ccbee27e57f99b067 Mon Sep 17 00:00:00 2001 From: Jason Alcorn <33233808+jaalcorn@users.noreply.github.com> Date: Tue, 20 Oct 2020 12:57:03 -0500 Subject: [PATCH] Add example of additional_codecs setting Add an example using the additional_codecs setting to clarify what the document is stating about using two codecs and reinforce the codec setting's tie to the Content-Type setting --- docs/index.asciidoc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/index.asciidoc b/docs/index.asciidoc index 30e8dd04..af34141d 100644 --- a/docs/index.asciidoc +++ b/docs/index.asciidoc @@ -107,6 +107,16 @@ Apply specific codecs for specific content types. The default codec will be applied only after this list is checked and no codec for the request's content-type is found +For example, to process a http request using _bulk you could use the following which would process the request using the json codec according to the Content-Type setting and, additionally, use the es_bulk codec: +[source,ruby] + http { + additional_codecs => {"application/json"=>"es_bulk"} + response_headers => { + "Content-Type" => "application/json" + } + } + } + [id="plugins-{type}s-{plugin}-cipher_suites"] ===== `cipher_suites`