A
A
Alexander Terekhov2021-06-30 14:24:22
Python
Alexander Terekhov, 2021-06-30 14:24:22

How to logout when using nginx-ldap-auth?

Hello!
For ldap authorization through nginx in the application I use this https://github.com/nginxinc/nginx-ldap-auth
Everything works fine!
But there is a problem - how to log out the user? I created a /logout location in nginx so that when you switch to it, a logout occurs. Please tell me how to logout a user using nginx or something else?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeniy _, 2021-06-30
@GeneD88

In the nginx-ldap-auth.conf configuration file, add the location

location /logout {
    return 401;
}

error_page 401 /errors/401.html;

location /errors {
    auth_basic off;
    ssi        on;
    ssi_types  text/html;
    alias /home/user/errors;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question