Repository is archived
No release in over 3 years
Low commit activity in last 3 years
Clean dirty cookies from Rack environment
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 0
>= 0
 Project Readme

rack-cleancookies

Clean dirty cookies from Rack environment and prevent Rack applications to stop working because of dirty cookies not conforming to RFC specifications.

Notes

This gem is useful only for Rack version <= 1.4.1; newer versions of Rack work correctly with bad encoded cookies.

Install

Just edit your Gemfile and add:

gem 'rack-cleancookies'

then add Rack::CleanCookies::Middleware to your Rack stack, e.g.:

use Rack::CleanCookies::Middleware

if you prefer to have the rack-errors env variable filled with dirty cookies, use:

use Rack::CleanCookies::Middleware, verbose: true

Authors

The original version was provided as a gist by Eric Cohen (https://github.com/eirc). Thanks!