Skip to content

IFrame Session is a gem that allows problematic web browsers (Internet Explorer and Safari) to use same cookies in iframes as in parent windows.

License

Notifications You must be signed in to change notification settings

LiveTyping/iframe_session

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IFrame Session

IFrame Session is a gem that allows problematic web browsers (Internet Explorer and Safari) to use same cookies in iframes as in parent windows.

The gem is Rails-dependent

Installation

Add this line to your application's Gemfile:

gem 'iframe_session', git: 'git://github.com/LiveTyping/iframe_session.git'

And then execute:

$ bundle

Usage example

Add call of iframe_session_fix(redirect_path, options = {}) method on the controller your root_path points to.

  • redirect_path is the parent iframe path
  • options is the options hash as for before_action call

Let's pretend your parent iframe path is http://example.com/ and your routes.rb looks like:

...
root 'home#index'
...

In this case your home_controller.rb should look like:

class HomeController < ApplicationController
  iframe_session_fix 'http://example.com/', only: :index

  def index
    ...
  end
  ...
end

About

IFrame Session is a gem that allows problematic web browsers (Internet Explorer and Safari) to use same cookies in iframes as in parent windows.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages