Conversation
|
Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement Learn more about why HashiCorp requires a CLA and what the CLA includes Serhii Shuiar seems not to be a GitHub user. Have you signed the CLA already but the status is still pending? Recheck it. |
| headers = DEFAULT_HEADERS.merge(headers) | ||
|
|
||
| # Dynamically read Nomad ACL token | ||
| headers = headers.merge({"X-Nomad-Token" => nomad_token}) |
There was a problem hiding this comment.
Do you mind guarding this so if nomad_token is nil the header is excluded.
| end | ||
| end | ||
|
|
||
|
|
| # Parses the value as a string, converting "" to nil (go compat). | ||
| string_as_nil: ->(item) { | ||
| if item.nil? || item.strip.empty? | ||
| if item.nil? || item.to_s.strip.empty? |
drewbailey
left a comment
There was a problem hiding this comment.
Thanks for this! One small change to exclude the header if it's nil, and a question about casting the string_as_nil to a string
No description provided.