Skip to content

Commit

Permalink
use database GeoLite2-City.mmdb
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-gribanov committed Jan 25, 2017
1 parent fe8598a commit e85b6ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ Default configuration:
gpslab_geoip:
# Path to download GeoIP database.
# It's a default value. You can change it.
cache: '%kernel.cache_dir%/GeoLite2-Country.mmdb'
cache: '%kernel.cache_dir%/GeoLite2-City.mmdb'

# URL for download new GeoIP database.
# It's a default value. You can change it.
url: 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz'
url: 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz'
```

## Usage
Expand Down
8 changes: 4 additions & 4 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class Configuration implements ConfigurationInterface
* Example config:
*
* gpslab_geoip:
* cache: '%kernel.cache_dir%/GeoLite2-Country.mmdb'
* url: 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz'
* cache: '%kernel.cache_dir%/GeoLite2-City.mmdb'
* url: 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz'
*
* @return TreeBuilder
*/
Expand All @@ -32,11 +32,11 @@ public function getConfigTreeBuilder()
->children()
->scalarNode('cache')
->cannotBeEmpty()
->defaultValue('%kernel.cache_dir%/GeoLite2-Country.mmdb')
->defaultValue('%kernel.cache_dir%/GeoLite2-City.mmdb')
->end()
->scalarNode('url')
->cannotBeEmpty()
->defaultValue('http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz')
->defaultValue('http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz')
->end()
->end()
->end()
Expand Down

0 comments on commit e85b6ef

Please sign in to comment.