cross-origin(跨源的/跨域的):在 Web 安全与浏览器环境中,指资源、请求或脚本来自不同的“源(origin)”。浏览器通常会对跨源访问施加限制(如“同源策略”),需要通过 CORS(跨源资源共享)等机制显式放行。(也常写作 cross origin / cross-origin)
/ˌkrɔːs ˈɔːrɪdʒɪn/
This request is cross-origin, so the browser may block it.
这个请求是跨源的,所以浏览器可能会阻止它。
The app uses cross-origin fetch calls, but they only succeed when the server sends the correct CORS headers.
这个应用会发起跨源的 fetch 请求,但只有在服务器返回正确的 CORS 头时才会成功。
由 cross-(跨越) + origin(起源/来源)构成。在浏览器语境里,origin(源)是一个技术概念,通常由协议(scheme)+ 域名(host)+ 端口(port)共同决定;当两者任一不同,就属于 cross-origin(跨源/跨域)。