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
1
74
Cross-origin resource sharing
Dmitry Zhlobo
July 02, 2015
Tweet
Share
More Decks by Dmitry Zhlobo
See All by Dmitry Zhlobo
Growing Rails Apps
dimazhlobo
1
140
Rails: The Good Parts
dimazhlobo
2
120
Ethereum Smart Contracts For Developers
dimazhlobo
0
98
Elasticsearch Introduction
dimazhlobo
0
740
Ruby Code Analisis
dimazhlobo
7
830
Other Decks in Programming
See All in Programming
Eloquentを使ってどこまでコードの治安を保てるのか?を新人が考察してみた
itokoh0405
0
3.1k
Functional Calisthenics in Kotlin: Kotlinで「関数型エクササイズ」を実践しよう
lagenorhynque
0
110
MCPサーバー「モディフィウス」で変更容易性の向上をスケールする / modifius
minodriven
7
1.4k
ビルドプロセスをデバッグしよう!
yt8492
0
280
問題の見方を変える「システム思考」超入門
panda_program
0
190
What’s Fair is FAIR: A Decentralised Future for WordPress Distribution
rmccue
0
150
自動テストを活かすためのテスト分析・テスト設計の進め方/JaSST25 Shikoku
goyoki
1
540
業務でAIを使いたい話
hnw
0
260
Designing Repeatable Edits: The Architecture of . in Vim
satorunooshie
0
260
Vueのバリデーション、結局どれを選べばいい? ― 自作バリデーションの限界と、脱却までの道のり ― / Which Vue Validation Library Should We Really Use? The Limits of Self-Made Validation and How I Finally Moved On
neginasu
3
1.8k
CSC509 Lecture 11
javiergs
PRO
0
300
AIを駆使して新しい技術を効率的に理解する方法
nogu66
0
570
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
660
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
24
1.5k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
Speed Design
sergeychernyshev
32
1.2k
How to Think Like a Performance Engineer
csswizardry
28
2.3k
RailsConf 2023
tenderlove
30
1.3k
Why Our Code Smells
bkeepers
PRO
340
57k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.2k
BBQ
matthewcrist
89
9.9k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
For a Future-Friendly Web
brad_frost
180
10k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
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?