Opened 5 days ago

Closed 5 days ago

#2118 closed enhancement (fixed)

The "freegeoip" setting should be disabled by default

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

Description (last modified by nicklas)

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 Changed 5 days ago by nicklas

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 Changed 5 days ago by nicklas

  • Description modified (diff)

comment:3 Changed 5 days ago by nicklas

(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 Changed 5 days ago by nicklas

  • Resolution set to fixed
  • Status changed from new to closed

(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.