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-origin resource sharing
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Dmitry Zhlobo
July 02, 2015
Programming
89
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Cross-origin resource sharing
Dmitry Zhlobo
July 02, 2015
More Decks by Dmitry Zhlobo
See All by Dmitry Zhlobo
Growing Rails Apps
dimazhlobo
1
190
Rails: The Good Parts
dimazhlobo
2
170
Ethereum Smart Contracts For Developers
dimazhlobo
0
140
Elasticsearch Introduction
dimazhlobo
0
780
Ruby Code Analisis
dimazhlobo
7
880
Other Decks in Programming
See All in Programming
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
120
AIを紡ぐPMのお話
swdtkuy
0
110
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
250
Google Apps Script で Ruby を動かす
kawahara
0
270
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
5
1.9k
AI時代に設計が 最大の生産性レバーになる 意図駆動開発とデータを消さない設計|Don't Delete Your Data or Your Intent — Design as the Deepest Lever in the AI Era
tomohisa
1
1k
yield再入門 #phpcon
o0h
PRO
0
1.1k
楽しそうなつよつよエンジニアと目が死んでる僕/A brilliant engineer having a blast, and dead-eyed me.
3l4l5
2
190
運用ダッシュボードの設計を誰も教えてくれないのだけどみなさんどうしてるんですか? - チームに監視するという文化を根付かせるための第一歩を踏みたい -
satoshi256kbyte
1
130
源内ハンズオン概要編
hideg
0
190
「人を評価する AI」の設計と実装
ryoyanara
0
210
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
470
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
64
56k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
540
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
490
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
270
Chasing Engaging Ingredients in Design
codingconduct
0
270
Marketing to machines
jonoalderson
1
5.7k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
580
Google's AI Overviews - The New Search
badams
0
1.1k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
240
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.4k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
770
Transcript
CORS Cross-origin resource sharing
Whitelist • <script> • <img> • <iframe> • <embed>
But XMLHttpRequest
XSS
Same origin
What to do? • WebSockets • Cross-document messaging • JSONP
• CORS
JSONP <script src=“http://otherdomain.com/test.json"> callback({"how" : "it works"})
CORS OPTIONS /test.json Host: example.com Origin: http://sbdmn.example.com Access-Control-Allow-Origin: http://sbdmn.example.com Access-Control-Allow-Methods:
GET, POST
CORS • Request: • Origin • Access-Control-Request-Method • Access-Control-Request-Headers •
Response: • Access-Control-Allow-Origin • Access-Control-Allow-Credentials • Access-Control-Expose-Headers • Access-Control-Max-Age • Access-Control-Allow-Methods • Access-Control-Allow-Headers
Questions?