diff --git a/app.psgi b/app.psgi index 1baa3b8..ac0e381 100755 --- a/app.psgi +++ b/app.psgi @@ -5,16 +5,12 @@ use warnings; use FindBin; use lib "$FindBin::Bin/lib"; - -# use this block if you don't need middleware, and only have a single target Dancer app to run here use cyberman; - -cyberman->to_app; - use Plack::Builder; builder { - enable 'Deflater'; - cyberman->to_app; + enable "Deflater"; + enable "Session"; + enable "CSRFBlock"; + cyberman->to_app; } - diff --git a/config.yml b/config.yml index 35fcaab..fef99a7 100644 --- a/config.yml +++ b/config.yml @@ -1,22 +1,7 @@ -# This is the main configuration file of your Dancer2 app -# env-related settings should go to environments/$env.yml -# all the settings in this file will be loaded at Dancer's startup. - -# Your application's name appname: "cyberman" - -# The default layout to use for your application (located in -# views/layouts/main.tt) layout: "main" - -# when the charset is set to UTF-8 Dancer2 will handle for you -# all the magic of encoding and decoding. You should not care -# about unicode within your app when this setting is set (recommended). charset: "UTF-8" - -# template engine -# simple: default and very basic template engine -# template_toolkit: TT +auto_page: 1 template: "template_toolkit" engines: @@ -25,8 +10,6 @@ engines: start_tag: '<%' end_tag: '%>' -auto_page: 1 - plugins: Database: driver: 'SQLite' diff --git a/cpanfile b/cpanfile index 51e1b97..3417ee2 100644 --- a/cpanfile +++ b/cpanfile @@ -4,13 +4,16 @@ requires "YAML" => "0"; requires "URL::Encode::XS" => "0"; requires "CGI::Deurl::XS" => "0"; requires "HTTP::Parser::XS" => "0"; -requires "Plack::Middleware::Deflater" => "0"; requires "Dancer2::Plugin::Database" => "0"; requires "DBD::SQLite" => "0"; requires "HTML::Entities" => "0"; requires "Digest::Bcrypt" => "0"; requires "Math::Random::Secure" => "0"; +requires "Plack::Middleware::Deflater" => "0"; +requires "Plack::Middleware::Session" => "0"; +requires "Plack::Middleware::CSRFBlock" => "0"; + on "test" => sub { requires "Test::More" => "0"; requires "HTTP::Request::Common" => "0";