Skip to content

Commit

Permalink
http_endpoint: fix handling of include header config (#6548)
Browse files Browse the repository at this point in the history
Previously the value was being rendered directly without iteration, so
we had a comma-separated list instead of a YAML sequence.

Also fix some copy-paste errors.
  • Loading branch information
efd6 authored and sodhikirti07 committed Jun 15, 2023
1 parent b3fb059 commit e2341e7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
5 changes: 5 additions & 0 deletions packages/http_endpoint/changelog.yml
@@ -1,3 +1,8 @@
- version: "1.9.1"
changes:
- description: Fix handling of include header config.
type: bugfix
link: https://github.com/elastic/integrations/pull/6548
- version: "1.9.0"
changes:
- description: Update package to ECS 8.8.0.
Expand Down
Expand Up @@ -51,15 +51,18 @@ response_body: '{{response_body}}'
url: {{url}}
{{/if}}
{{#if include_headers}}
include_headers: {{include_headers}}
include_headers:
{{#each include_headers as |header|}}
- {{header}}
{{/each}}
{{/if}}
{{#if ssl}}
ssl:
{{ssl}}
{{/if}}
{{#if tags}}
tags:
{{#each tags as |tag i|}}
{{#each tags as |tag|}}
- {{tag}}
{{/each}}
{{/if}}
Expand Down
4 changes: 2 additions & 2 deletions packages/http_endpoint/data_stream/generic/manifest.yml
Expand Up @@ -123,13 +123,13 @@ streams:
show_user: false
- name: response_body
type: text
title: Response Code
title: Response Body
description: The response body returned upon success. Should be a single line JSON string.
required: false
show_user: false
- name: include_headers
type: text
title: Response Code
title: Include Headers
description: This options specifies a list of HTTP headers that should be copied from the incoming request and included in the document. All configured headers will always be canonicalized to match the headers of the incoming request. For example, ["content-type"] will become ["Content-Type"] when the filebeat is running.
multi: true
required: false
Expand Down
2 changes: 1 addition & 1 deletion packages/http_endpoint/manifest.yml
Expand Up @@ -3,7 +3,7 @@ name: http_endpoint
title: Custom HTTP Endpoint Logs
description: Collect JSON data from listening HTTP port with Elastic Agent.
type: integration
version: "1.9.0"
version: "1.9.1"
conditions:
kibana.version: "^7.16.0 || ^8.0.0"
categories:
Expand Down

0 comments on commit e2341e7

Please sign in to comment.