Welcome! Log In Create A New Profile

Advanced

Add Secure flag to cookies

Posted by Franklin Yu 
Add Secure flag to cookies
March 19, 2019 11:00PM
It would be very helpful if NGINX can have a configuration option to add flags to some cookies. It should look like this:

```
proxy_cookie_set_flags JSESSIONID Secure HttpOnly;
```

This is very useful. For example, when we use NGINX as HTTP terminal, the backend shall not set the Secure flag, or it won’t work in development environment. (Development environment typically don’t have TLS certificates.) Current work-around is described in

https://unix.stackexchange.com/questions/306463/nginx-add-secure-flag-to-cookies-from-proxied-server

which is unfortunate. The number of upvotes and comments in that question explains how useful this feature is.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 158
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready