Skip to content

Commit

Permalink
feat: Add token on header if have the enviroment variable (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielfigueira authored May 28, 2024
1 parent 2fd49d8 commit 9fc5787
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ GEM

PLATFORMS
arm64-darwin-22
x86_64-darwin-22
x86_64-linux

DEPENDENCIES
Expand All @@ -114,4 +115,4 @@ DEPENDENCIES
webmock (~> 3.18, >= 3.18.1)

BUNDLED WITH
2.4.12
2.4.19
2 changes: 1 addition & 1 deletion lib/chroma/api_operations/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def execute_request(method, url, params = {}, options = {})
request.content_type = "application/json"
request.body = params.to_json if params.size > 0
request.basic_auth(uri.user, uri.password) if !uri.user.nil?

request['X-Chroma-Token'] = ENV.fetch('CHROMA_SERVER_AUTHN_CREDENTIALS', nil) if ENV.fetch('CHROMA_SERVER_AUTHN_CREDENTIALS', nil)
request
end
end
Expand Down

0 comments on commit 9fc5787

Please sign in to comment.