Opened 6 years ago

Closed 6 years ago

#2118 closed enhancement (fixed)

The "freegeoip" setting should be disabled by default

Reported by: Nicklas Nordborg Owned by: everyone
Priority: minor Milestone: BASE 3.12.3
Component: install Version:
Keywords: Cc:

Description (last modified by Nicklas Nordborg)

The current service will be disabled on July 1st, 2018. It will be replaced with a compatible service that requires registration and the use of an "API KEY". It should still be a free service for basic usage. A BASE server admin need to set this up before the geolocation services are used.

For more information see: https://github.com/apilayer/freegeoip#readme

Basically the current setting that is:

http://freegeoip.net/json/{IP}

need to be replaced with:

http://api.ipstack.com/{IP}?access_key=YOUR_ACCESS_KEY&output=json&legacy=1

where YOUR_ACCESS_KEY should be replaced with the key that you get after registering.

Note that we do not expect that we need to make any code changes in BASE due to this. Fixing the base.config file should work also with older BASE version. (Turns out that a BASE update is needed, see comment:1)

Change History (4)

comment:1 by Nicklas Nordborg, 6 years ago

Unfortunately, the new service will not work with the existing BASE code. The problem is that BASE will only accept the answer if the response contains a line:

Content-Type: application/json

The new service sends:

Content-Type: application/json; Charset=UTF-8

Thus, BASE also need an update in order to accept the answer from the new service.

comment:2 by Nicklas Nordborg, 6 years ago

Description: modified (diff)

comment:3 by Nicklas Nordborg, 6 years ago

(In [7484]) References #2118: The "freegeoip" setting should be disabled by default

This fixes the problem with the Content-Type header. It should now accept all answers that contain application/json data.

comment:4 by Nicklas Nordborg, 6 years ago

Resolution: fixed
Status: newclosed

(In [7486]) Fixes #2118: The "freegeoip" setting should be disabled by default

Updated the base.config file with information about the new service.

Note: See TracTickets for help on using tickets.