aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2014-07-04 09:35:34 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2014-07-04 09:35:34 +0100
commit198b2a3dc0d4eff3887e90cb176ca91c32ca0341 (patch)
treee80c9f316770da8d87d2315bf8f18999d5a6379f
parent94fe6843fc995627dc2250ae79041fcaece2bb14 (diff)
Update secure proxy list to include www.fixmystreet.com.
-rw-r--r--perllib/FixMyStreet/App.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index 0d3b024a8..7922dfea1 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -94,8 +94,11 @@ __PACKAGE__->setup();
# tell the code we're secure if we are.
after 'prepare_headers' => sub {
my $self = shift;
- $self->req->secure( 1 ) if $self->config->{BASE_URL} eq 'https://www.zueriwieneu.ch';
- $self->req->secure( 1 ) if $self->config->{BASE_URL} eq 'http://www.fixmystreet.com' && $self->req->headers->header('Host') eq 'fix.bromley.gov.uk';
+ my $base_url = $self->config->{BASE_URL};
+ my $host = $self->req->headers->header('Host');
+ $self->req->secure( 1 ) if $base_url eq 'https://www.zueriwieneu.ch';
+ $self->req->secure( 1 ) if $base_url eq 'https://www.fixmystreet.com'
+ && ( $host eq 'fix.bromley.gov.uk' || $host eq 'www.fixmystreet.com' );
};
# set up DB handle for old code