Try our conversational search powered by Generative AI!

Class ClientGeolocationOptions

Contains options for how Geolocation for the client is retrieved.

Inheritance
System.Object
ClientGeolocationOptions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Personalization
Assembly: EPiServer.Framework.AspNet.dll
Version: 11.20.7
Syntax
[Options]
public class ClientGeolocationOptions

Constructors

ClientGeolocationOptions()

Declaration
public ClientGeolocationOptions()

Properties

IPAddressHeader

The name of a header that is used to retrieve the IP-address of the client. This setting should be used if the site is located behind a proxy server to get the right IP address of the client.

Declaration
public string IPAddressHeader { get; set; }
Property Value
Type Description
System.String

IPAddressHeaderProxyCount

The number of proxy servers in front of the web server listed by IP in the IPAddressHeader. Default value is 1.

Declaration
public int IPAddressHeaderProxyCount { get; set; }
Property Value
Type Description
System.Int32
Examples

If the proxy count is 3 and the client request contains a header "X-Forwarded-For" with the value "217.114.83.121, 217.114.83.129, 217.114.83.128, 217.114.83.127", the actual client IP address is assumed to be 217.114.83.129.

LocationHeader

The name of a header that provides geolocation information in the form of a ISO 3166-1 Alpha-2 country code.

Declaration
public string LocationHeader { get; set; }
Property Value
Type Description
System.String

Extension Methods