4 ms·
Using this: https://cloud.google.com/compute/docs/load-balancing/http/backend-service#user-defined-request-headers https://cloud.google.com/compute/docs/load-b
by misterbowfinger 8y ago
Using this:
https://cloud.google.com/compute/docs/load-balancing/http/backend-service#user-defined-request-headers 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.
- manigandham 8y agoIf using the CLI, don't put the single quotes or the whole thing will become the header without a value.
- vadimska 8y agoI 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}'