Caching is breaking something
This commit is contained in:
parent
e04b1ebc9d
commit
5982b2728c
3 changed files with 51 additions and 28 deletions
|
|
@ -1,8 +1,9 @@
|
|||
BEGIN {
|
||||
|
||||
# This is just a temporary hack
|
||||
our $WEBGUI_ROOT = '/data/WebGUI';
|
||||
our $WEBGUI_ROOT = '/data/WebGUI';
|
||||
our $WEBGUI_DOMAINS = '/data/domains';
|
||||
our $WEBGUI_CONFIG = 'dev.localhost.localdomain';
|
||||
our $WEBGUI_CONFIG = 'dev.localhost.localdomain';
|
||||
}
|
||||
use local::lib $WEBGUI_ROOT;
|
||||
use WebGUI;
|
||||
|
|
@ -11,26 +12,30 @@ use Plack::Builder;
|
|||
|
||||
my $app = sub {
|
||||
my $env = shift;
|
||||
$env->{'wg.WEBGUI_ROOT'} = $WEBGUI_ROOT;
|
||||
$env->{'wg.WEBGUI_CONFIG'} = "$WEBGUI_CONFIG.conf";
|
||||
$env->{'wg.DIR_CONFIG.WebguiRoot'} = $env->{'wg.WEBGUI_ROOT'};
|
||||
$env->{'wg.WEBGUI_ROOT'} = $WEBGUI_ROOT;
|
||||
$env->{'wg.WEBGUI_CONFIG'} = "$WEBGUI_CONFIG.conf";
|
||||
$env->{'wg.DIR_CONFIG.WebguiRoot'} = $env->{'wg.WEBGUI_ROOT'};
|
||||
$env->{'wg.DIR_CONFIG.WebguiConfig'} = $env->{'wg.WEBGUI_CONFIG'};
|
||||
WebGUI::handle_psgi($env);
|
||||
};
|
||||
|
||||
# Apply some Middleware
|
||||
builder {
|
||||
|
||||
# /extras
|
||||
enable Plack::Middleware::Static
|
||||
path => qr{^/extras/}, root => "$WEBGUI_ROOT/www/";
|
||||
|
||||
enable Plack::Middleware::Static
|
||||
path => qr{^/extras/},
|
||||
root => "$WEBGUI_ROOT/www/";
|
||||
|
||||
# /uploads (ignore .wgaccess for now..)
|
||||
enable Plack::Middleware::Static
|
||||
path => qr{^/uploads/}, root => "$WEBGUI_DOMAINS/dev.localhost.localdomain/public/";
|
||||
|
||||
enable Plack::Middleware::Static
|
||||
path => qr{^/uploads/},
|
||||
root => "$WEBGUI_DOMAINS/dev.localhost.localdomain/public/";
|
||||
|
||||
enable Plack::Middleware::XFramework framework => 'WebGUI';
|
||||
|
||||
enable Plack::Middleware::AccessLog format => "combined";
|
||||
|
||||
|
||||
# Already enabled by plackup script
|
||||
# enable Plack::Middleware::AccessLog format => "combined";
|
||||
|
||||
$app;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue