From 84edf6f76e4a9cfe91ce2071c216d9fcb52da052 Mon Sep 17 00:00:00 2001 From: Thomas Nordquist Date: Wed, 19 Jul 2017 13:59:31 +0200 Subject: [PATCH] Add user-agent header to search index download --- entrypoint.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index b469a23..77f8b10 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,9 +1,13 @@ #!/bin/bash + # Download elasticsearch index if [ ! -d "/photon/photon_data/elasticsearch" ]; then echo "Downloading search index" - wget -O - http://download1.graphhopper.com/public/photon-db-latest.tar.bz2 | bzip2 -cd | tar x + + # Let graphhopper know where the traffic is coming from + USER_AGENT="docker: thomasnordquist/photon-geocoder" + wget --user-agent="$USER_AGENT" -O - http://download1.graphhopper.com/public/photon-db-latest.tar.bz2 | bzip2 -cd | tar x fi # Start photon if elastic index exists