No commit activity in last 3 years
No release in over 3 years
Relaxed options for CookieJar
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 0.11
~> 10.0
~> 3.0
~> 0.15

Runtime

= 0.3.3
 Project Readme

Relaxed CookieJar

Gem Version Build Status Maintainability Test Coverage

A gem that includes a monkeypatch for the original CookieJar gem.

This gem exists simply because the original CookieJar gem seems to be abandoned yet it is still used by a lot of other gems (like Faye). The main change this gem does is to relax the policies for matched domains.

For example, if you are trying to connect to a Salesforce PushTopic, the code will try to match the requested domain (something like company--ver.inst.my.salesforce.com) with the cookie domain (.salesforce.com) and it will obviously fail. CookieJar does try to go one level deep (so it will also add .inst.my.salesforce.com to the list of valid domains) but obviously this will not work.

This gem basically overrides the CookieJar::CookieValidation.compute_search_domains_for_host method so it will go slightly deeper and also add .my.salesforce.com and .salesforce.com to the list of expected domains.

Usage

Simply require this gem:

require 'faye'
require 'relaxed_cookiejar'

This should be it.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/andreimaxim/relaxed_cookiejar.

License

The gem is available as open source under the terms of the MIT License.