6 use Catalyst::Runtime '5.70';
8 #Need to preload, otherwise the first hit is slow
12 # Set flags and add plugins for the application
14 # -Debug: activates the debug mode for very useful log messages
15 # ConfigLoader: will load the configuration from a YAML file in the
16 # application's home directory
17 # Static::Simple: will serve static files from the application's root
20 use parent qw/Catalyst/;
22 our $VERSION = '0.01';
24 # Configure the application.
26 # Note that settings in ndweb.yml (or other external
27 # configuration file that you set up manually) take precedence
28 # over this when using ConfigLoader. Thus configuration
29 # details given here can function as a default configuration,
30 # with a external configuration file acting as an override for
33 __PACKAGE__->config( name => 'NDWeb' );
34 __PACKAGE__->config->{'Plugin::Authentication'}{'use_session'} = 1;
35 __PACKAGE__->config(session => {
36 storage => "/tmp/ndweb-$>/sesession",
37 directory_umask => 077,
39 __PACKAGE__->config( cache => {
41 class => "Cache::FileCache",
42 cache_root => "/tmp/ndweb-$>",
43 directory_umask => 077,
47 __PACKAGE__->config( page_cache => {
48 set_http_headers => 1,
52 # Start the application
53 __PACKAGE__->setup(qw/
59 Authentication::Store::NDWeb
60 Authentication::Credential::Password
67 Session::State::Cookie
74 __PACKAGE__->deny_access_unless('/users',[qw/admin_users/]);
75 __PACKAGE__->deny_access_unless('/alliances/resources',[qw/alliances_resources/]);
76 __PACKAGE__->deny_access_unless('/graphs/alliancevsintel',[qw/graphs_intel/]);
77 __PACKAGE__->deny_access_unless('/graphs/avgalliancevsintel',[qw/graphs_intel/]);
81 NDWeb - Catalyst based application
85 script/ndweb_server.pl
89 [enter your description here]
93 L<NDWeb::Controller::Root>, L<Catalyst>
101 This library is free software, you can redistribute it and/or modify
102 it under the same terms as Perl itself.