From 1c074c2b9a5960fee6d3e637edaff12f858e0eed Mon Sep 17 00:00:00 2001
From: Daniel Friesel <derf@finalrewind.org>
Date: Sun, 10 Mar 2019 19:44:51 +0100
Subject: [PATCH] secure session cookies

---
 index.pl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/index.pl b/index.pl
index 52ec80f1..93ce5384 100755
--- a/index.pl
+++ b/index.pl
@@ -43,7 +43,6 @@ my @action_types = (qw(checkin checkout undo));
 app->plugin(
 	authentication => {
 		autoload_user => 1,
-		session_key   => 'foodor',
 		fail_render   => { template => 'login' },
 		load_user     => sub {
 			my ( $self, $uid ) = @_;
@@ -1288,6 +1287,10 @@ get '/s/*station' => sub {
 	}
 };
 
+if ( $ENV{TRAVELYNX_SECRETS} ) {
+	app->secrets( [ split( qr{:}, $ENV{TRAVELYNX_SECRETS} ) ] );
+}
+
 app->defaults( layout => 'default' );
 
 app->config(
-- 
GitLab