Skip to content

country names don't match iso code with cloutflare frontend #121

@sitnikov

Description

@sitnikov

There's an nginx with the geoip2 module set up.

geoip2 /var/lib/GeoIP/GeoLite2-Country.mmdb {
auto_reload 24h;
$geoip2_country default=XX country iso_code;
$geoip2_country_name country names en;
}

It receives traffic from Cloudflare, and real_ip is configured.

However, in X_GEOIP2_COUNTRY_NAME, the country is correct, but in X_GEOIP2_COUNTRY_CODE, it's not (it shows the country of Cloudflare)."

image

#> mmdblookup --file  /var/lib/GeoIP/GeoLite2-Country.mmdb --ip 212.7.1.5 country  iso_code

  "EE" <utf8_string>

#> mmdblookup --file  /var/lib/GeoIP/GeoLite2-Country.mmdb --ip 212.7.1.5 country names en

  "Estonia" <utf8_string>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions