Skip to content
Module for Nginx which removes flag "secure" from cookies.
C
Branch: master
Clone or download
Pull request Compare This branch is 2 commits ahead of AirisX:master.

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Initial commit Mar 17, 2017
README.md Add few notes about Docker in README Oct 14, 2019
config
ngx_http_unsecure_cookie_filter_module.c Unsecure cookie module Apr 19, 2019

README.md

The Nginx module for removing "Secure" cookie flag

License

The Nginx module for removing "Secure" cookie flag

Dependencies

Compatibility

  • 1.11.x (last tested: 1.11.2)

Earlier versions is not tested.

Installation

  1. Clone the git repository.
git clone git@github.com:yumauri/nginx_unsecure_cookie_module.git
  1. Add the module to the build configuration by adding --add-module=/path/to/nginx_unsecure_cookie_module or --add-dynamic-module=/path/to/nginx_unsecure_cookie_module

  2. Build the nginx binary.

  3. Install the nginx binary.

Synopsis

location / {
    unsecure_cookie Secret;
    unsecure_cookie *;
    unsecure_cookie SessionID;
    unsecure_cookie SiteToken;
}

Description

This module for Nginx removes flag "Secure" from cookies in the "Set-Cookie" upstream response headers. It is possible to set a default value using symbol "*". In this case "Secure" flag will be removed from all cookies.

Directives

unsecure_cookie

- -
Syntax unsecure_cookie <cookie_name|*>;
Default -
Context server, location

Description: Removes "Secure" flag from desired cookie.

Docker

If you want to have Docker image with this module, you can take this snippet as starting point.
Or, take this Docker image, made by Brice Vandeputte, at your own risk.

Author

Author of original module nginx_cookie_flag_module is
Anton Saraykin [Airisenator@gmail.com]

I just put my dirty hands on his code :)

You can’t perform that action at this time.