diff options
-rw-r--r-- | conf/general.yml-example | 4 | ||||
-rw-r--r-- | perllib/FixMyStreet/App.pm | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/conf/general.yml-example b/conf/general.yml-example index e24f0dc80..f2e35451e 100644 --- a/conf/general.yml-example +++ b/conf/general.yml-example @@ -36,7 +36,9 @@ GOOGLE_MAPS_API_KEY: '' BING_MAPS_API_KEY: '' # Location of MapIt, to map points to administrative areas. -# If left blank, a default area will be used everywhere. +# If left blank, a default area will be used everywhere +# (a URL needs to be given for non-web things, like sending +# of reports, to function). MAPIT_URL: '' # If using the Catalyst development server, set to # MAPIT_URL: 'http://localhost:3000/fakemapit/' diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm index 3096f2f72..b29b922dd 100644 --- a/perllib/FixMyStreet/App.pm +++ b/perllib/FixMyStreet/App.pm @@ -183,6 +183,8 @@ sub setup_request { FixMyStreet::Map::set_map_class( $cobrand->map_type || $c->req->param('map_override') ); unless ( FixMyStreet->config('MAPIT_URL') ) { + my $port = $c->req->uri->port; + $host = "$host:$port" unless $port == 80; mySociety::MaPit::configure( "http://$host/fakemapit/" ); } |