use X-Consul-Token header instead of token query parameter #655
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request (PR) description
Hi,
this change replaces the usage of the token query paramter with the HTTP header X-Consul-Token when interacting with ACLs, key/values and prepared queries.
The header was introduced in Consul 0.6.0.
The change is necessary as the token query parameter is marked deprecated in Consul 1.15.x. Using it triggers deprecation warnings in the Consul logs each time this module runs on a server.
Luckily it was not removed yet so there is still time to fix it.
I've tested the changes with our internal Puppet module in Vagrant.
This pull request was created by my best knowladge. I'm working as system administrator and have no ruby expertise but got some help from colleagues in our company. Thus said I'm open for any suggestion to improve this.
Thanks in advance!
This Pull Request (PR) fixes the following issues
n/a.