Skip to content

Instantly share code, notes, and snippets.

View lukebooth's full-sized avatar
💭
I broke it, I'll fix it 😅

Luke Booth lukebooth

💭
I broke it, I'll fix it 😅
  • Overland Park, KS
View GitHub Profile
@lukebooth
lukebooth / mailgun.rb
Created March 24, 2016 14:56
mailgun-ruby Rails setup
# in initializers
require "ostruct"
Rails.configuration.mailgun = OpenStruct.new(
YAML.load_file(Rails.root + "config/mailgun.yml")[Rails.env])
@lukebooth
lukebooth / explanation.md
Last active February 3, 2016 15:35
Session hijack ourselves

The situation

  • Using Rails 4.1.8
  • People can have a custom domain to use with our app
  • For some actions, we use ssl and redirect them to the domain we provide them

The problem

  • If the person has a custom domain, I want as much of their time using the app to be on that domain
  • I need a way to carry sessions/cookies over to another domain
  • This, for example, will allow them to use ssl to sign in on our domain and I can redirect them back to their custom domain, signed in there