Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use HTTPS environment setting to detect https connections
the ReverseProxy module doesn't rewrite SERVER_PROTOCOL but it does
change HTTPS based on X-Forwarded-* headers.
  • Loading branch information
ehuelsmann committed Oct 10, 2021
1 parent e9d657d commit c242f5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/LedgerSMB/Middleware/AuthenticateSession.pm
Expand Up @@ -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 {
Expand Down

0 comments on commit c242f5a

Please sign in to comment.