File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Firestore/core/src/remote Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ const char* const kAppCheckHeader = "x-firebase-appcheck";
6161const char * const kAuthorizationHeader = " authorization" ;
6262const char * const kXGoogApiClientHeader = " x-goog-api-client" ;
6363const char * const kGoogleCloudResourcePrefix = " google-cloud-resource-prefix" ;
64+ const char * const kXGoogRequestParams = " x-goog-request-params" ;
6465
6566std::string MakeString (absl::string_view view) {
6667 return view.data () ? std::string{view.data (), view.size ()} : std::string{};
@@ -272,9 +273,15 @@ std::unique_ptr<grpc::ClientContext> GrpcConnection::CreateContext(
272273 // This header is used to improve routing and project isolation by the
273274 // backend.
274275 const DatabaseId& db_id = database_info_->database_id ();
276+ // TODO(b/199767712): We are keeping this until Emulators can be released with
277+ // this cl/428820046. Currently blocked because Emulators are now built with
278+ // Java 11 from Google3.
275279 context->AddMetadata (kGoogleCloudResourcePrefix ,
276280 StringFormat (" projects/%s/databases/%s" ,
277281 db_id.project_id (), db_id.database_id ()));
282+ context->AddMetadata (kXGoogRequestParams ,
283+ StringFormat (" projects/%s/databases/%s" ,
284+ db_id.project_id (), db_id.database_id ()));
278285 return context;
279286}
280287
You can’t perform that action at this time.
0 commit comments