Rack middleware for enabling problematic web browsers (Internet Explorer and Safari) to use same cookies in iframes as in parent windows.
Best described via:
- http://tempe.st/tag/ruby-on-rails
- http://groups.google.com/group/rack-devel/browse_thread/thread/11da5971522b107b
- http://grack.com/blog/2010/01/06/3rd-party-cookies-dom-storage-and-privacy
- http://anantgarg.com/2010/02/18/cross-domain-cookies-in-safari
Add to your Gemfile
:
gem 'rack-iframe'
…and bundle install
.
Minimal:
require 'rack/iframe' use Rack::Iframe
Custom – P3P header:
require 'rack/iframe' use Rack::Iframe, :p3p => %(CP="NOI DSP LAW NID")
$ bundle exec rake test
…or using Guard:
$ bundle exec guard
This gem was developed for our own requirements at Merchii, so feel free to send pull-requests with enhancements of any kind (features, bug-fixes, documentation, tests, etc.) to make it better or useful for you as well.
Still not ready for prime-time. See TODO.
Released under the MIT license.
Copyright © Jonas Grimfelt, Jaakko Suutarla, Merchii