CORS
0 人感兴趣 · 11 次引用
- 最新
- 推荐


谈跨域资源共享之 CORS
CORS 即 Cross-origin resource sharing,跨域资源共享 ,是由 W3C 官方推广的允许通过 AJAX 技术跨域获取资源的规范 。

朋友,你听说过跨域吗
大部分开发人员在前后端分离的场景下,都遇到过浏览器跨域问题,然后在网上搜了几个配置就解决了。但是,你真的了解跨域这件事吗?而你找到的配置又做什么?

跨域问题(CORS / Access-Control-Allow-Origin)
跨域资源共享( CORS )机制允许 Web 应用服务器进行跨域访问控制,从而使跨域数据传输得以安全进行。浏览器支持在 API 容器中(例如 XMLHttpRequest 或 Fetch )使用 CORS,以降低跨域 HTTP 请求所带来的风险。
