CORS 是 Cross-Origin Resource Sharing 的缩写,中文常译为跨域资源共享:一种浏览器安全机制,允许网页在“不同源”(域名/协议/端口不同)时,在服务器明确许可的前提下访问资源(常通过响应头如 Access-Control-Allow-Origin 等来控制)。
(在技术语境中也常被当作一个词使用;它本身是缩写。)
/kɔːrz/
The API fails because CORS is blocked.
这个 API 调用失败,因为被 CORS 拦截了。
To enable the web app to request data from a different domain, the server must configure CORS headers correctly, otherwise the browser will reject the response.
为了让网页应用能从不同域名请求数据,服务器必须正确配置 CORS 响应头,否则浏览器会拒绝该响应。
CORS 来自 Cross-Origin Resource Sharing: