CORS in Action: Creating and consuming cross-origin APIs (Paperback)
暫譯: CORS 實戰:創建與使用跨來源 API
Monsur Hossain
- 出版商: Manning
- 出版日期: 2014-10-31
- 售價: $1,700
- 貴賓價: 9.5 折 $1,615
- 語言: 英文
- 頁數: 240
- 裝訂: Paperback
- ISBN: 161729182X
- ISBN-13: 9781617291821
-
相關分類:
JavaScript
立即出貨 (庫存=1)
買這商品的人也買了...
-
$1,590$1,511 -
$1,398$1,328 -
$1,520$1,444 -
$1,675$1,591 -
$680$537 -
$1,200$948 -
$403前端架構:從入門到微前端
-
$403了不起的 JavaScript 工程師:從前端到全端高級進階
-
$306軟計算原理與實現
-
$1,900$1,805
商品描述
Summary
CORS in Action introduces Cross-Origin Resource Sharing (CORS) from both the server and the client perspective. It starts with the basics: how to make CORS requests and how to implement CORS on the server. It then explores key details such as performance, debugging, and security. API authors will learn how CORS opens their APIs to a wider range of users. JavaScript developers will find valuable techniques for building rich web apps that can take advantage of APIs hosted anywhere. The techniques described in this book are especially applicable to mobile environments, where browsers are guaranteed to support CORS.
Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.
About the Book
Suppose you need to share some JSON data with another application or service. If everything is hosted on one domain, it's a snap. But if the data is on another domain, the browser's "same-origin" policy stops you cold. CORS is a new web standard that enables safe cross-domain access without complex server-side code. Mastering CORS makes it possible for web and mobile applications to share data simply and securely.
CORS in Action introduces CORS from both the server and the client perspective. It starts with making and enabling CORS requests and then explores performance, debugging, and security. You'll learn to build apps that can take advantage of APIs hosted anywhere and how to write APIs that expand your products to a wider range of users.
For web developers comfortable with JavaScript. No experience with CORS is assumed.
What's Inside
- CORS from the ground up
- Serving and consuming cross-domain data
- Best practices for building CORS APIs
- When to use CORS alternatives like JSON-P and proxies
About the Author
Monsur Hossain is an engineer at Google who has worked on API-related projects such as the Google JavaScript Client, the APIs Discovery Service, and CORS support for Google APIs.
Table of Contents
PART 1 INTRODUCING CORS
PART 2 CORS ON THE SERVER
PART 3 DEBUGGING CORS REQUESTS
APPENDIXES
- The Core of CORS
- Making CORS requests
- Handling CORS requests
- Handling preflight requests
- Cookies and response headers
- Best practices
- Debugging CORS requests
- CORS reference
- Configuring your environment
- What is CSRF?
- Other cross-origin techniques
商品描述(中文翻譯)
**摘要**
《CORS in Action》從伺服器和客戶端的角度介紹了跨來源資源共享(CORS)。本書從基礎開始:如何發送 CORS 請求以及如何在伺服器上實現 CORS。接著探討了性能、除錯和安全性等關鍵細節。API 作者將學習到 CORS 如何使他們的 API 向更廣泛的用戶開放。JavaScript 開發者將發現有價值的技術,以構建可以利用任何地方托管的 API 的豐富網頁應用程式。本書中描述的技術特別適用於移動環境,因為瀏覽器保證支持 CORS。
購買印刷版書籍可獲得 Manning Publications 提供的免費 PDF、Kindle 和 ePub 格式電子書。
**關於本書**
假設您需要與另一個應用程式或服務共享一些 JSON 數據。如果所有內容都托管在同一個域上,那就簡單了。但如果數據位於另一個域上,瀏覽器的「同源」政策會讓您無法進行操作。CORS 是一種新的網頁標準,能夠在不需要複雜伺服器端代碼的情況下實現安全的跨域訪問。掌握 CORS 使得網頁和移動應用程式能夠簡單且安全地共享數據。
《CORS in Action》從伺服器和客戶端的角度介紹 CORS。它從發送和啟用 CORS 請求開始,然後探討性能、除錯和安全性。您將學會構建可以利用任何地方托管的 API 的應用程式,以及如何編寫 API 以擴展您的產品到更廣泛的用戶。
本書適合對 JavaScript 感到舒適的網頁開發者。不假設有 CORS 的經驗。
**內容概覽**
- 從基礎開始了解 CORS
- 提供和消費跨域數據
- 構建 CORS API 的最佳實踐
- 何時使用 JSON-P 和代理等 CORS 替代方案
**關於作者**
**Monsur Hossain** 是 Google 的一名工程師,曾參與與 API 相關的項目,如 Google JavaScript 客戶端、API 發現服務和 Google API 的 CORS 支持。
**目錄**
**第一部分 介紹 CORS**
**第二部分 伺服器上的 CORS**
**第三部分 除錯 CORS 請求**
**附錄**
1. CORS 的核心
2. 發送 CORS 請求
3. 處理 CORS 請求
4. 處理預檢請求
5. Cookies 和響應標頭
6. 最佳實踐
7. 除錯 CORS 請求
A. CORS 參考
B. 配置您的環境
C. 什麼是 CSRF?
D. 其他跨來源技術