Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(config): allow remote config with no auth #6469

Merged
merged 1 commit into from
Sep 30, 2019
Merged

fix(config): allow remote config with no auth #6469

merged 1 commit into from
Sep 30, 2019

Conversation

rawkode
Copy link
Contributor

@rawkode rawkode commented Sep 30, 2019

Adding an Authorization: Token <token> header causes 404 errors with GitHub when using the raw content URI.

This fix only adds the header when the token is available, allowing for public configs to be loaded correctly.

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

You can test this with:

telegraf --config https://raw.githubusercontent.com/influxdata/telegraf/master/etc/telegraf.conf

To see the HTTP behaviour without Telegraf:

Returns 404:

curl -X GET -H "Authorization: Token ABC" -H "Accept: application/toml" -I https://raw.githubusercontent.com/influxdata/telegraf/master/etc/telegraf.conf

Returns 200

curl -X GET -H "Accept: application/toml" -I https://raw.githubusercontent.com/influxdata/telegraf/master/etc/telegraf.conf

Adding an `Authorization: Token <token>` header causes 404 errors with GitHub when using the raw content URI.

This fix only adds the header when the token is available, allowing for public configs to be loaded correctly.
@danielnelson danielnelson added this to the 1.12.3 milestone Sep 30, 2019
@danielnelson danielnelson added the fix pr to fix corresponding bug label Sep 30, 2019
@danielnelson danielnelson merged commit 367dee7 into influxdata:master Sep 30, 2019
danielnelson pushed a commit that referenced this pull request Sep 30, 2019
@rawkode rawkode deleted the bugfix/remote-config-no-auth branch October 1, 2019 00:01
bitcharmer pushed a commit to bitcharmer/telegraf that referenced this pull request Oct 18, 2019
athoune pushed a commit to bearstech/telegraf that referenced this pull request Apr 17, 2020
idohalevi pushed a commit to idohalevi/telegraf that referenced this pull request Sep 29, 2020
arstercz pushed a commit to arstercz/telegraf that referenced this pull request Mar 5, 2023
arstercz pushed a commit to arstercz/telegraf that referenced this pull request Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants