Skip to content

Instantly share code, notes, and snippets.

@aanoaa
Created July 26, 2013 10:02
Show Gist options
  • Save aanoaa/6087745 to your computer and use it in GitHub Desktop.
Save aanoaa/6087745 to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use Plack::Builder;
use Plack::App::File;
my $app = require "bin/oauth";
my $static = Plack::App::File->new(root => "./assets")->to_app;
builder {
enable_if { $_[0]->{REMOTE_ADDR} eq '127.0.0.1' } "Plack::Middleware::ReverseProxy";
enable "ConditionalGET";
mount "/" => $app;
mount "/assets" => $static;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment