diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-07-01 13:35:17 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-07-04 16:26:56 +0100 |
commit | 88933aa8df0f748dce8188cde99b6199ae070864 (patch) | |
tree | 11a5ad35d1ab675a18ec73b752d35f8540414cc4 /perllib/FixMyStreet/App/View/Web.pm | |
parent | 45aaf63033e7d4d24ba570f7460746fe28f9f59f (diff) |
Make sure map JS works through an admin proxy.
Tidy up use of absolute URLs when in the admin.
Have the 404 handler spot static files in admin as a fallback.
Diffstat (limited to 'perllib/FixMyStreet/App/View/Web.pm')
-rw-r--r-- | perllib/FixMyStreet/App/View/Web.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm index a92021f0c..d43d3af7e 100644 --- a/perllib/FixMyStreet/App/View/Web.pm +++ b/perllib/FixMyStreet/App/View/Web.pm @@ -176,7 +176,8 @@ sub version { $version_hash{$file} = ( stat( $path ) )[9]; } $version_hash{$file} ||= ''; - return "$file?$version_hash{$file}"; + my $admin = $self->template->context->stash->{admin} ? FixMyStreet->config('ADMIN_BASE_URL') : ''; + return "$admin$file?$version_hash{$file}"; } sub decode { |