nginx-ldap-auth icon indicating copy to clipboard operation
nginx-ldap-auth copied to clipboard

Set cookie on successful authentication

Open mjiderhamn opened this issue 6 years ago • 0 comments

The current implementation has support for reading the auth info from a cookie (named in X-CookieName). This PR adds the ability to also set the value of that same cookie upon successful authentication.

In order to make use of this feature, the following should be added to the Nginx config, in addition to auth_request

  auth_request_set $saved_set_cookie $upstream_http_set_cookie;
  add_header Set-Cookie $saved_set_cookie;

mjiderhamn avatar Aug 02 '19 12:08 mjiderhamn