openresty / encrypted-session-nginx-module

encrypt and decrypt nginx variable values
http://openresty.org
195 stars 52 forks source link

explicit specification of encryption in each request #17

Open anshnd opened 6 years ago

anshnd commented 6 years ago

I need to make two separate session encryptions within the same location and they shouldn't share the same key. I tried in vain to add encryption key as an optional additional parameter to set_encrypt_session or set_decrypt_session but got stuck when I couldn't tell whether the optional parameter was specified.

As an alternative I added two new directives: set_encrypt_session_keyed $target <value> <key> set_decrypt_session_keyed $target <value> <key>