Coder Social home page Coder Social logo

andreimaxim / relaxed_cookiejar Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 10 KB

A version of the CookieJar gem that is more relaxed towards domains.

License: MIT License

Ruby 73.02% Shell 1.74% Dockerfile 25.25%
ruby cookies cookiejar salesforce

relaxed_cookiejar's Introduction

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.

relaxed_cookiejar's People

Contributors

andreimaxim avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.