Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Cross-Domain Sessions with Ruby on Rails
Search
Lukas Fittl
January 09, 2014
Programming
1
450
Cross-Domain Sessions with Ruby on Rails
So, how does one write a Rails 4 session store?
Lukas Fittl
January 09, 2014
Tweet
Share
More Decks by Lukas Fittl
See All by Lukas Fittl
How to Scale Postgres - Automation, Tuning & Sharding
lfittl
0
660
What's Missing for Postgres Monitoring
lfittl
0
250
A Map For Monitoring PostgreSQL
lfittl
2
390
Monitoring Postgres at Scale
lfittl
1
450
Monitoring PostgreSQL at Scale
lfittl
4
270
Postgres Performance for App Developers
lfittl
2
310
GraphQL ❤ PostgreSQL -- P.S. aka BeatQL
lfittl
1
600
Hacking PostgreSQL to Gain SQL Parsing Superpowers
lfittl
1
600
PostgreSQL at a Web Startup
lfittl
3
600
Other Decks in Programming
See All in Programming
JETLS.jl ─ A New Language Server for Julia
abap34
1
280
俺流レスポンシブコーディング 2025
tak_dcxi
14
8.5k
宅宅自以為的浪漫:跟 AI 一起為自己辦的研討會寫一個售票系統
eddie
0
490
愛される翻訳の秘訣
kishikawakatsumi
1
310
ソフトウェア設計の課題・原則・実践技法
masuda220
PRO
26
22k
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
7
1k
Cap'n Webについて
yusukebe
0
120
エディターってAIで操作できるんだぜ
kis9a
0
700
AIコーディングエージェント(Gemini)
kondai24
0
200
ゲームの物理 剛体編
fadis
0
320
「コードは上から下へ読むのが一番」と思った時に、思い出してほしい話
panda728
PRO
38
25k
複数人でのCLI/Infrastructure as Codeの暮らしを良くする
shmokmt
5
2.2k
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Writing Fast Ruby
sferik
630
62k
[SF Ruby Conf 2025] Rails X
palkan
0
500
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
Rails Girls Zürich Keynote
gr2m
95
14k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
GraphQLとの向き合い方2022年版
quramy
50
14k
Thoughts on Productivity
jonyablonski
73
5k
Code Reviewing Like a Champion
maltzj
527
40k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Transcript
@LukasFittl Cross-Domain Sessions So, how does one write a Rails
4 session store?
Biz + UX + Dev @LukasFittl
So, 7 years ago we started this company: commit 2086c55b13426c2834f7060ad3739eed68e891c2
Author: Esad Hajdarevic <
[email protected]
> Date: Sun Mar 25 22:47:30 2007 +0000 ! Initial tags+trunk creation git-svn-id: svn://svn.phoria.eu/soup/trunk@1 c0834aa2-9929-0410-9117-c50b2a7daf23
Its still around :) ! But it runs Rails 2.3.
100+ hours later we’re (almost) on Rails 4.
Soooo... Sessions.
www.soup.io = Login/Logout/etc
mysoup.io = Soup Admin, Create Posts, etc
How can we make that work?
First thought: <iframe>
Actually, thats pretty painful.
What we ended up doing: www.soup.io mysoup.io Memcached / Redis
SESSION_ID REMOTE_SESSION_ID
Getting a REMOTE_SESSION_ID: http://mysoup.io/ => http://soup.io/remote/generate?host=mysoup.io (requested with main session
cookie YYY) ! => http://mysoup.io/?sessid=ZZZ SetCookie: soup_session_id=ZZZ ! => http://mysoup.io/ ! remote_session_link_ZZZ => mysoup.io--YYY Memcached / Redis
Lets look at the code :)
@LukasFittl Thank you! pganalyze.com