Skip to content

Commit

Permalink
add back the secure accessor
Browse files Browse the repository at this point in the history
  • Loading branch information
miyagawa committed Nov 29, 2009
1 parent ef881fe commit 83e84de
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/Plack/Request.pm
Expand Up @@ -32,6 +32,10 @@ sub user { $_[0]->env->{REMOTE_USER} }
sub request_uri { $_[0]->env->{REQUEST_URI} }
sub url_scheme { $_[0]->env->{'psgi.url_scheme'} }

sub secure {
$_[0]->url_scheme eq 'https';
}

# we need better cookie lib?
# http://mark.stosberg.com/blog/2008/12/cookie-handling-in-titanium-catalyst-and-mojo.html
sub cookies {
Expand Down Expand Up @@ -458,8 +462,9 @@ Returns the request uri (like $ENV{REQUEST_URI})
=item query_parameters
Returns a reference to a hash containing query string (GET) parameters. Values can
be either a scalar or an arrayref containing scalars.
Returns a reference to a hash containing query string (GET)
parameters. Values can be either a scalar or an arrayref containing
scalars.
=item secure
Expand Down

0 comments on commit 83e84de

Please sign in to comment.