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
Dmitry Zhlobo
July 02, 2015
Programming
86
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
180
Rails: The Good Parts
dimazhlobo
2
160
Ethereum Smart Contracts For Developers
dimazhlobo
0
130
Elasticsearch Introduction
dimazhlobo
0
770
Ruby Code Analisis
dimazhlobo
7
870
Other Decks in Programming
See All in Programming
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
320
RTSPクライアントを自作してみた話
simotin13
0
520
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.2k
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
150
OSもどきOS
arkw
0
480
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
250
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
1.3k
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
220
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.6k
Modding RubyKaigi for Myself
yui_knk
0
910
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.3k
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
190
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
28
2.6k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
56k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
310
The agentic SEO stack - context over prompts
schlessera
0
800
Unsuck your backbone
ammeep
672
58k
AI: The stuff that nobody shows you
jnunemaker
PRO
8
700
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
850
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
310
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
170
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
420
Thoughts on Productivity
jonyablonski
76
5.2k
Heart Work Chapter 1 - Part 1
lfama
PRO
7
36k
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?