aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-07-18 20:15:37 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-07-18 20:15:40 +0100
commitcbe5a191b974b28878b14a593601348483618bf7 (patch)
tree4c231c604d25560fee0354181f587b8ce50e1d36 /perllib/FixMyStreet/App.pm
parent069800e2fdf9b130e01774bc208ff9a060b18544 (diff)
Get port for default mapit URL.
Diffstat (limited to 'perllib/FixMyStreet/App.pm')
-rw-r--r--perllib/FixMyStreet/App.pm2
1 files changed, 2 insertions, 0 deletions
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/" );
}