We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d0d32b0 commit d563eb5Copy full SHA for d563eb5
1 file changed
lib/finch_api/client.rb
@@ -121,6 +121,17 @@ def initialize(
121
headers = {
122
"finch-api-version" => "2020-09-17"
123
}
124
+ custom_headers_env = ENV["FINCH_CUSTOM_HEADERS"]
125
+ unless custom_headers_env.nil?
126
+ parsed = {}
127
+ custom_headers_env.split("\n").each do |line|
128
+ colon = line.index(":")
129
+ unless colon.nil?
130
+ parsed[line[0...colon].strip] = line[(colon + 1)..].strip
131
+ end
132
133
+ headers = parsed.merge(headers)
134
135
136
@client_id = client_id&.to_s
137
@client_secret = client_secret&.to_s
0 commit comments