diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/App.pm | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f43c9558..da8db9838 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ - Fix issue with Open311 codes starting with ‘_’. - Development improvements: - Make front page cache time configurable. + - Better working of /fakemapit/ under https. * v2.5 (21st December 2018) - Front end improvements: diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm index 21f9082bb..2a279c4e2 100644 --- a/perllib/FixMyStreet/App.pm +++ b/perllib/FixMyStreet/App.pm @@ -237,9 +237,9 @@ sub setup_request { $c->stash->{map_js} = FixMyStreet::Map::map_javascript(); unless ( FixMyStreet->config('MAPIT_URL') ) { - my $port = $c->req->uri->port; - $host = "$host:$port" unless $port == 80; - mySociety::MaPit::configure( "http://$host/fakemapit/" ); + my $host_port = $c->req->uri->host_port; + my $scheme = $c->req->uri->scheme; + mySociety::MaPit::configure( "$scheme://$host_port/fakemapit/" ); } $c->stash->{has_fixed_state} = FixMyStreet::DB::Result::Problem::fixed_states->{fixed}; |