fluent / fluent/fluentd

out_http: Add an ability to use ENV variables interpolation in headers_from_placeholders

Open
#5,050 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Ruby
Stars
13.6k
Forks
1.4k
Avg merge
1d 3h
Merged PRs (30d)
20

Description

### Is your feature request related to a problem? Please describe.

Hi!
I am using `out_http` plugin for sending logs to Coralogix. This service requires setting the Authorization header with Bearer TOKEN, where TOKEN is a secret value. I do not want to put it directly in the configuration file and would like to get it from environment variables using such construction `#{ENV.fetch('TOKEN')}`. I have tried to use `headers_from_placeholders` but had no luck - the construction `#{ENV.fetch('TOKEN')}` was set as a string without interpolation.

### Describe the solution you'd like

Add the ability to use the construction `#{ENV.fetch('TOKEN')}` in the `headers_from_placeholders` settings.

### Describe alternatives you've considered

I used the parameter `headers_from_placeholders`

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.