diff options
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index fc4581fa1..a40ae2c2d 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -3,6 +3,7 @@ package FixMyStreet::Cobrand::Default; use strict; use warnings; use FixMyStreet; +use URI; use Carp; @@ -142,6 +143,18 @@ Return the base url for the cobranded version of the site sub base_url { mySociety::Config::get('BASE_URL') } +=head2 base_host + +Return the base host for the cobranded version of the site + +=cut + +sub base_host { + my $self = shift; + my $uri = URI->new( $self->base_url ); + return $uri->host; +} + =head2 enter_postcode_text Return the text that prompts the user to enter their postcode/place name. |