lib/google/cloud/firestore/v1beta1/firestore_client.rb in google-cloud-firestore-1.3.0 vs lib/google/cloud/firestore/v1beta1/firestore_client.rb in google-cloud-firestore-1.4.0
- old
+ new
@@ -237,9 +237,12 @@
google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
google_api_client << " grpc/#{GRPC::VERSION}"
google_api_client.freeze
headers = { :"x-goog-api-client" => google_api_client }
+ if credentials.respond_to?(:quota_project_id) && credentials.quota_project_id
+ headers[:"x-goog-user-project"] = credentials.quota_project_id
+ end
headers.merge!(metadata) unless metadata.nil?
client_config_file = Pathname.new(__dir__).join(
"firestore_client_config.json"
)
defaults = client_config_file.open do |f|