News for hackers. Stuff that matters.
Re:Geolocating requests with Google Load Balancer for free by misterbowfinger on Tuesday April 24, 2018 @11:25AM (#16913363)
Using this:

https://cloud.google.com/compute/docs/load-balancing/http/ba...

The load balancer expands variables to empty strings when it cannot determine their values, for example for geographic location variables when the IP address’s location is unknown, or for TLS parameters when TLS is not in use.

Geographic values (regions, subdivisions, and cities) are estimates based on the client’s IP address. From time to time, we update the data that provides these values in order to improve accuracy and to reflect geographic and political changes.

Re:Geolocating requests with Google Load Balancer for free by manigandham on Tuesday April 24, 2018 @11:47AM (#16913599)
If using the CLI, don't put the single quotes or the whole thing will become the header without a value.
Re:Geolocating requests with Google Load Balancer for free by vadimska on Tuesday April 24, 2018 @12:23PM (#16913997)
I have used the CLI and the quotes worked fine for me. Here is the complete command I have used:

gcloud beta compute backend-services update app --custom-request-header 'X-Client-Geo-Location:{client_region},{client_region_subdivision},{client_city}' --custom-request-header 'X-Client-Geo-Region:{client_region_subdivision}' --custom-request-header 'X-Client-Geo-LatLong:{client_city_lat_long}' --custom-request-header 'X-Client-TLS-Version:{tls_version}' --custom-request-header 'X-Client-TLS-Chiper:{tls_cipher_suite}' --custom-request-header 'X-Client-Hostname:{tls_sni_hostname}' --custom-request-header 'X-Client-RTT:{client_rtt_msec}'