You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If rules code returns arrayref with 3xx status, its location is ignored, usually resulting in infinite redirect.
Example:
use strict;
use warnings;
use Plack::Builder;
builder {
enable 'Rewrite', rules => sub {
return [ 302, [ Location => '/foo'], [] ] if /bar/;
};
sub {
my $env = shift;
return [200, [], [ "Path: $env->{PATH_INFO}" ] ];
};
};
This app produces an infinite redirect if asked for /bar url.
PS: The reason I'm using it this way instead of substituting $_ and returning 302 is that I call external $app on different rules, and they handle some rewriting themselves.
The text was updated successfully, but these errors were encountered:
If rules code returns arrayref with 3xx status, its location is ignored, usually resulting in infinite redirect.
Example:
This app produces an infinite redirect if asked for
/bar
url.PS: The reason I'm using it this way instead of substituting
$_
and returning 302 is that I call external$app
on different rules, and they handle some rewriting themselves.The text was updated successfully, but these errors were encountered: