collab: Attach GeoIP country code to RPC sessions (#15814)

This PR updates collab to attach the user's GeoIP country code to their
RPC session.

We source the country code from the
[`CF-IPCountry`](https://developers.cloudflare.com/fundamentals/reference/http-request-headers/#cf-ipcountry)
header.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-08-05 11:11:49 -04:00 committed by GitHub
parent be0ccf47ee
commit f11f3f2599
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 52 additions and 31 deletions

View file

@ -244,6 +244,7 @@ impl TestServer {
client_name,
Principal::User(user),
ZedVersion(SemanticVersion::new(1, 0, 0)),
None,
Some(connection_id_tx),
Executor::Deterministic(cx.background_executor().clone()),
))
@ -377,6 +378,7 @@ impl TestServer {
"dev-server".to_string(),
Principal::DevServer(dev_server),
ZedVersion(SemanticVersion::new(1, 0, 0)),
None,
Some(connection_id_tx),
Executor::Deterministic(cx.background_executor().clone()),
))