|
|
@@ -167,8 +167,11 @@ sub _routes ( $data = {} ) {
|
|
|
# XXX this is probably bad in the case of the specific content-typed routes, they should be mutex
|
|
|
my %roots = $data->routes();
|
|
|
|
|
|
- # Setup the /secure/... versions for logged in users
|
|
|
- @roots{ map { "/secure$_" } keys(%roots) } = values(%roots);
|
|
|
+ # Setup the /secure/... versions for logged in users, except for already secured routes.
|
|
|
+ foreach my $route (keys(%roots)) {
|
|
|
+ next if index($route, '/secure/') == 0;
|
|
|
+ $roots{"/secure$route"} = $roots{$route};
|
|
|
+ }
|
|
|
|
|
|
# It is the responsibility of theme authors to setup /secure routes (other than index)
|
|
|
my %themed = Trog::Themes::routes();
|