Nick Dunn
Nick Dunn

Reputation: 1

Maxmind JavaScript API doesn't support TLD-less (local) domains

I'm using the JavaScript API (http://dev.maxmind.com/geoip/geoip2/javascript/) which works well. However using zombie.js (zombie.labnotes.org) for testing my UI I'm seeing errors:

Error: Server returned status code 401 from https://geoip-ipv4.maxmind.com/geoip/v2.1/city/me

Presumably this is because there's no referrer and the page is rendered from a localhost:port URL. The Maxmind UI doesn't allow me to add TLD-less domains (e.g. localhost).

If I attempt to mock the request:

browser.resources.mock('https://geoip-ipv4.maxmind.com/geoip/v2.1/city/me', {});

I get:

Error: undefined: Cannot make request to different domain

I this a bug with Maxmind's API or zombie?

Upvotes: 0

Views: 212

Answers (1)

Michael C.
Michael C.

Reputation: 1457

According to the error code 401 as published in the web site, there are 2 possibilities of getting this error.

Reason 1: The domain of your site is not registered.

Reason 2: You tried to access a service or feature that is not covered by your service plan.

Upvotes: 0

Related Questions