diff --git a/lib/LedgerSMB/Middleware/AuthenticateSession.pm b/lib/LedgerSMB/Middleware/AuthenticateSession.pm index 8dbcacddd6..063e444153 100644 --- a/lib/LedgerSMB/Middleware/AuthenticateSession.pm +++ b/lib/LedgerSMB/Middleware/AuthenticateSession.pm @@ -209,7 +209,7 @@ sub call { $dbh->rollback; $dbh->disconnect; - my $secure = ($env->{SERVER_PROTOCOL} eq 'https') ? '; Secure' : ''; + my $secure = ($env->{HTTPS} eq 'ON') ? '; Secure' : ''; my $path = LedgerSMB::PSGI::Util::cookie_path($env->{SCRIPT_NAME}); return Plack::Util::response_cb( $res, sub {