Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Insert a P3P header into your Rack webapp.

branch: master
Octocat-spinner-32 lib Initial commit April 23, 2010
Octocat-spinner-32 .gitignore Initial commit April 23, 2010
Octocat-spinner-32 README.md Initial commit April 23, 2010
Octocat-spinner-32 rack-p3p.gemspec Initial commit April 23, 2010
README.md

Rack-P3p is rack middleware for inserting P3P headers into apps. This will allow your application to serve cookies to IE when in an iframe. It will also pull off the cookie on 304 responses, since IE does not like the cookie then.

Usage

To use Rack-P3p in rails, do the following. Anything else and we'll assume you're smart enough to figure it out :-)

Add rack-p3p to your gemfile:

gem 'rack-p3p'

Add it to your middleware stack in config/application.rb:

config.middleware.insert_before ActionDispatch::Session::CookieStore, Rack::P3p

Enjoy.

Credits

The code for this middleware was shamelessly ripped from a rubyonrails-core post from Robert Vogel. Thanks, Rob!

Something went wrong with that request. Please try again.