New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added maxmind.default.override parameter to CRConfig to handle maxmind default locations #1866
Added maxmind.default.override parameter to CRConfig to handle maxmind default locations #1866
Conversation
added documentation for geolocation.default.override profile parameter
Can one of the admins verify this patch? |
97aef6f
to
ba0c0ca
Compare
7ff4465
to
08cc6ba
Compare
08cc6ba
to
2b2a8df
Compare
@@ -158,6 +158,9 @@ Many of the settings for the different servers in a Traffic Control CDN are cont | |||
+--------------------------+---------------+---------------------------------------------------------------------------------------------------------------------------------------+ | |||
| geolocation6.polling.url | CRConfig.json | The location to get the IPv6 GeoLiteCity database from. | | |||
+--------------------------+---------------+---------------------------------------------------------------------------------------------------------------------------------------+ | |||
| maxmind.default.override | CRConfig.json | The destination geo coordinates to use for client location when maxmind returns a default location that matches the country code. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we enter more than 1 country at a time? i.e. US and Canada?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this parameter can be specified multiple times with different values. The documentation should be updated to reflect that.
@rivasj can you update the documentation to reflect this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated documentation to show support for multiple parameter values.
@@ -86,6 +87,8 @@ | |||
private final ConsistentHasher consistentHasher = new ConsistentHasher(); | |||
private SteeringRegistry steeringRegistry; | |||
|
|||
private final Map<String, Geolocation> defaultGeolocations = new HashMap<String, Geolocation>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick, but variable might be more clear named defaultGeolocationsOverride. Skimming the code I got this confused with defaultLocation (which is what we call a geolocation from Maxmind w/o a city or postal code)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've renamed defaultGeolocations to defaultGeolocationsOverride
Maintain a list of country code/coordinate pairs as: CountryCode;Lat,Long - in CRConfig.json to use instead of a default location for a given country. When a default location is indicated, TR checks if that country code has an entry specified in the config. If it does, it will set the client location to use the coordinates in that entry.