Make proxy timeouts configurable
Change-Id: I761f8e1c3fe6e57936e7ac9cee7422e94ec94ee4
diff --git a/lib/Kalamar.pm b/lib/Kalamar.pm
index c597634..bf77ad2 100644
--- a/lib/Kalamar.pm
+++ b/lib/Kalamar.pm
@@ -37,7 +37,6 @@
# Add additional plugin path
push(@{$self->plugins->namespaces}, __PACKAGE__ . '::Plugin');
-
# Set secrets for signed cookies
if (-e (my $secret = $self->home->child('kalamar.secret'))) {
@@ -115,6 +114,14 @@
push @{$self->static->paths}, 'dev';
};
+ # Set proxy timeouts
+ if ($conf->{proxy_inactivity_timeout}) {
+ $self->ua->inactivity_timeout($conf->{proxy_inactivity_timeout});
+ };
+ if ($conf->{proxy_connect_timeout}) {
+ $self->ua->connect_timeout($conf->{proxy_connect_timeout});
+ };
+
# Client notifications
$self->plugin(Notifications => {
'Kalamar::Plugin::Notifications' => 1,