Permalink
Browse files

Stop supporting skins

  • Loading branch information...
1 parent 683b286 commit 699b95270ef60528bca8c796e50d73dddc7da389 @autarch autarch committed Feb 16, 2012
Showing with 0 additions and 36 deletions.
  1. +0 −1 lib/VegGuide/Config.pm
  2. +0 −35 lib/VegGuide/Plugin/FixupHost.pm
View
@@ -25,7 +25,6 @@ use Sys::Hostname qw( hostname );
{
my @StandardImports = qw( AuthenCookie
+VegGuide::Plugin::ErrorHandling
- +VegGuide::Plugin::FixupHost
+VegGuide::Plugin::FixupURI
+VegGuide::Plugin::InOutEncoding
+VegGuide::Plugin::ResponseAttributes
@@ -1,35 +0,0 @@
-package VegGuide::Plugin::FixupHost;
-
-use strict;
-use warnings;
-
-use MRO::Compat;
-
-sub prepare_action {
- my $self = shift;
-
- my $skin = $self->skin();
- my $host = $self->request()->uri()->host();
-
- if ( VegGuide::Config->IsProduction() ) {
- my $skin_host = $self->skin()->hostname();
- my $uri_host = $self->request()->uri()->host();
-
- if ( $uri_host && $uri_host !~ /^\Q$skin_host./ ) {
- $self->response()
- ->redirect( 'http://' . $skin->hostname() . '.vegguide.org' );
- }
- }
-
- return $self->maybe::next::method(@_);
-}
-
-sub dispatch {
- my $self = shift;
-
- return if $self->response()->redirect();
-
- return $self->maybe::next::method(@_);
-}
-
-1;

0 comments on commit 699b952

Please sign in to comment.