Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Reverse proxy for nginx

  • Loading branch information...
commit 7b7e22d7d6bf52fa4b36f5bfb868d9adb4e7885c 1 parent 4430dd4
Kartik Thakore authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 implementation/SIMS/SIMS/script/sims.psgi
View
8 implementation/SIMS/SIMS/script/sims.psgi
@@ -1,8 +1,16 @@
#!/usr/bin/env perl
use strict;
use warnings;
+
+use Plack::Builder;
use SIMS;
SIMS->setup_engine('PSGI');
my $app = sub { SIMS->run(@_) };
+builder {
+ enable_if { $_[0]->{REMOTE_ADDR} eq '127.0.0.1' }
+ "Plack::Middleware::ReverseProxy";
+ $app;
+};
+
Please sign in to comment.
Something went wrong with that request. Please try again.