Delete SSO cookie with Nginx (#1630)

environments/ppa-mbqj77/deployments/671^2
Christophe Maudoux 6 years ago
parent 72daca2f8f
commit 5a03e518c8
  1. 3
      lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Server/Nginx.pm

@ -67,6 +67,9 @@ sub handler {
my ( $self, $req ) = @_;
my $hdrs = $req->{respHeaders};
$req->{respHeaders} = [];
my $cookie = $req->env->{HTTP_COOKIE};
my $cn = $self->Lemonldap::NG::Handler::Main::tsv->{cookieName};
$cookie =~ s/\b$cn(http)?=[^,;]*[,;\s]*//og;
my @convertedHdrs =
( 'Content-Length' => 0, Cookie => ( $req->env->{HTTP_COOKIE} // '' ) );
my $i = 0;

Loading…
Cancel
Save