Skip to content

Instantly share code, notes, and snippets.

@hesco
Last active February 12, 2018 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hesco/c615cfd9cb0376cdd57f2fa6418d8035 to your computer and use it in GitHub Desktop.
Save hesco/c615cfd9cb0376cdd57f2fa6418d8035 to your computer and use it in GitHub Desktop.
Given this revised sample code below, I have this question: (1) will /v1/app/foo/add route be protected by the user_sessions#logged_in authentication of the parent application?
sub startup {
<snip>
my $auth = $r->under('/v1/app')->to('user_sessions#logged_in');
<snip>
my $r_foo = $app->plugin(Mount => {$auth->any('/foo') => '/home/sri/myapp.pl'});
$r_foo->get('/add')->to('example#foo');
<snip>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment