Skip to content

Commit

Permalink
Use VegGuide::SiteURI to generate redirect URIs
Browse files Browse the repository at this point in the history
  • Loading branch information
autarch committed Aug 5, 2015
1 parent 543cc2b commit 7201876
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/VegGuide/Plugin/FixupURI.pm
Expand Up @@ -4,6 +4,7 @@ use strict;
use warnings;

use MRO::Compat;
use VegGuide::SiteURI qw( site_uri );

sub prepare_action {
my $self = shift;
Expand All @@ -30,8 +31,11 @@ sub prepare_action {
$new_p{$k} = $v;
}

my $uri = $self->request->uri;
$uri->query_form(%new_p);
my $uri = site_uri(
path => $self->request->path,
query => \%new_p,
with_host => 1,
);
$self->response->redirect($uri);
}

Expand Down

0 comments on commit 7201876

Please sign in to comment.