Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
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
440
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
630
What's Missing for Postgres Monitoring
lfittl
0
220
A Map For Monitoring PostgreSQL
lfittl
2
370
Monitoring Postgres at Scale
lfittl
1
400
Monitoring PostgreSQL at Scale
lfittl
4
240
Postgres Performance for App Developers
lfittl
2
280
GraphQL ❤ PostgreSQL -- P.S. aka BeatQL
lfittl
1
580
Hacking PostgreSQL to Gain SQL Parsing Superpowers
lfittl
1
560
PostgreSQL at a Web Startup
lfittl
3
590
Other Decks in Programming
See All in Programming
Boast Code Party / RubyKaigi 2025 After Event
lemonade_37
0
120
Orleans + Sekiban + SignalR でリアルタイムWeb作ってみた
tomohisa
0
260
Flutterでllama.cppをつかってローカルLLMを試してみた
sakuraidayo
0
160
Storybookの情報をMCPサーバー化する
shota_tech
3
1.4k
M5UnitUnified 最新動向 2025/05
gob
0
140
プロダクトエンジニアのしごと 〜 受託 × 高難度を乗り越えるOptium開発 〜
algoartis
0
250
ruby.wasmとWebSocketで遊ぼう!
lnit
0
110
ASP.NETアプリケーションのモダナイゼーションについて
tomokusaba
0
280
クラス設計の手順
akikogoto
0
130
CQRS/ESのクラスとシステムフロー ~ RailsでフルスクラッチでCQRSESを組んで みたことから得た学び~
suzukimar
0
140
2025-04-25 GitHub Copilot Agent ライブデモ(スクリプト)
goataka
0
130
今話題のMCPサーバーをFastAPIでサッと作ってみた
yuukis
0
150
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
94
13k
Navigating Team Friction
lara
185
15k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
14
1.5k
Visualization
eitanlees
146
16k
Music & Morning Musume
bryan
47
6.5k
Thoughts on Productivity
jonyablonski
69
4.6k
The World Runs on Bad Software
bkeepers
PRO
68
11k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
13
850
The Cult of Friendly URLs
andyhume
78
6.4k
Raft: Consensus for Rubyists
vanstee
137
6.9k
Become a Pro
speakerdeck
PRO
28
5.3k
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