Skip to content

Restricting connections in Controller #14

Description

@duffee

Improve the authentication tutorial.
Mention that the is_logged_in() method needs to return a true or false value to affect the under clause.

if ($self->tx->remote_address eq '128.168.0.3') {
    $self->render( inline => '<h2>Restricted Access</h2>', status => 403 );
}

just falls through to the following return 1 if $self->session('logged_in') and renders the page to the undesirable ip address.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions