X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=lib%2FNDWeb.pm;h=0231a28f91a1a2cab3f217aad4d5524a1a0480d5;hb=0fbd06db65d17ee776b038e33e8071548066a99d;hp=51c5e7f730b24096cfb3c3a4b73a2f7aed5c1a9e;hpb=c018a7ccbb1fd8bdec5c8f97b151686ae933870b;p=ndwebbie.git diff --git a/lib/NDWeb.pm b/lib/NDWeb.pm index 51c5e7f..0231a28 100644 --- a/lib/NDWeb.pm +++ b/lib/NDWeb.pm @@ -13,11 +13,11 @@ use Catalyst::Runtime 5.80; # directory use parent qw/Catalyst/; + use Catalyst qw/ -Debug ConfigLoader Static::Simple - Unicode Authentication Authentication::Store::NDWeb @@ -31,9 +31,6 @@ use Catalyst qw/ Session::Store::File Session::State::Cookie - Compress::Gzip - Compress::Deflate - Cache PageCache /; @@ -47,6 +44,8 @@ sub signal_bots { system 'killall','-USR1', 'ndbot.pl'; } +#$SIG{__WARN__} = sub { NDWeb->log->warn(@_); }; + # Configure the application. # # Note that settings in ndweb.conf (or other external @@ -67,6 +66,7 @@ __PACKAGE__->config(session => { directory_umask => 077, expires => 300, verify_address => 1, + cookie_secure => 2, }); __PACKAGE__->config( "Plugin::Cache" => { backend => { @@ -84,15 +84,21 @@ __PACKAGE__->config( page_cache => { }); __PACKAGE__->config( default_model => 'Model'); +__PACKAGE__->config( encoding => 'UTF-8'); # Start the application __PACKAGE__->setup(); __PACKAGE__->deny_access_unless('/users',[qw/admin_users/]); +__PACKAGE__->allow_access_if('/users/sms',[qw/users_sms/]); +__PACKAGE__->allow_access_if('/users/postsms',[qw/users_sms/]); __PACKAGE__->deny_access_unless('/alliances',[qw/alliances/]); __PACKAGE__->deny_access_unless('/alliances/resources',[qw/alliances_resources/]); __PACKAGE__->deny_access_unless('/graphs/alliancevsintel',[qw/graphs_intel/]); __PACKAGE__->deny_access_unless('/graphs/avgalliancevsintel',[qw/graphs_intel/]); __PACKAGE__->deny_access_unless('/members',[qw/members/]); +__PACKAGE__->allow_access_if('/members/postowncoords',[qw/attack_menu/]); +__PACKAGE__->allow_access_if('/members/launchConfirmation',[qw/attack_menu/]); +__PACKAGE__->allow_access_if('/members/postconfirmation',[qw/attack_menu/]); __PACKAGE__->deny_access_unless('/members/defenders',[qw/members_defenders/]); __PACKAGE__->deny_access_unless('/covop',[qw/covop/]); __PACKAGE__->deny_access_unless('/calls',[qw/calls_edit/]);