Skip to content

A varnish vmod for simpler use of the cookie header

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
COPYING
Notifications You must be signed in to change notification settings

vojenfr/libvmod-cookie

 
 

Repository files navigation

Varnish Cookie Module

SYNOPSIS

import cookie;

DESCRIPTION

forked project [ https://github.com/lkarsten/libvmod-cookie ]

FUNCTIONS

new fonctions :

1/ cookie.sort_string();
The cookies will be classified in alphabetical order.
2/ cookie.count();
Count cookies numbers.

INSTALLATION

The source tree is based on autotools to configure the building, and does also have the necessary bits in place to do functional unit tests using the varnishtest tool.

Usage:

./configure VARNISHSRC=DIR [VMODDIR=DIR]

VARNISHSRC is the directory of the Varnish source tree for which to compile your vmod. Both the VARNISHSRC and VARNISHSRC/include will be added to the include search paths for your module.

Optionally you can also set the vmod install directory by adding VMODDIR=DIR (defaults to the pkg-config discovered directory from your Varnish installation).

Make targets:

  • make - builds the vmod
  • make install - installs the vmod in VMODDIR

In your VCL you could then use this vmod along the following lines:

import cookie;
sub vcl_recv {
        cookie.parse(req.http.cookie);
        set req.http.Cookie = cookie.sort_string();
        set req.http.N-Cookie = cookie.count();
}

About

A varnish vmod for simpler use of the cookie header

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 91.8%
  • Shell 8.2%