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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
680
What's Missing for Postgres Monitoring
lfittl
0
270
A Map For Monitoring PostgreSQL
lfittl
2
400
Monitoring Postgres at Scale
lfittl
1
460
Monitoring PostgreSQL at Scale
lfittl
4
280
Postgres Performance for App Developers
lfittl
2
320
GraphQL ❤ PostgreSQL -- P.S. aka BeatQL
lfittl
1
620
Hacking PostgreSQL to Gain SQL Parsing Superpowers
lfittl
1
610
PostgreSQL at a Web Startup
lfittl
3
610
Other Decks in Programming
See All in Programming
Ruby x Terminal
a_matsuda
7
580
受け入れテスト駆動開発(ATDD)×AI駆動開発 AI時代のATDDの取り組み方を考える
kztakasaki
2
520
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
120
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
160
Claude Code、ちょっとした工夫で開発体験が変わる
tigertora7571
0
200
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
170
Claude Codeセッション現状確認 2026福岡 / fukuoka-aicoding-00-beacon
monochromegane
4
390
Go1.26 go fixをプロダクトに適用して困ったこと
kurakura0916
0
330
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
120
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
150
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
280
日本だけで解禁されているアプリ起動の方法
ryunakayama
0
370
Featured
See All Featured
The SEO Collaboration Effect
kristinabergwall1
0
380
The Cult of Friendly URLs
andyhume
79
6.8k
For a Future-Friendly Web
brad_frost
183
10k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
Abbi's Birthday
coloredviolet
2
5.1k
AI: The stuff that nobody shows you
jnunemaker
PRO
3
350
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
63
53k
Facilitating Awesome Meetings
lara
57
6.8k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
430
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
67
37k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
210
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