CORS - 什么时候返回`Access-Control-Expose-Headers` [英] CORS - When to return `Access-Control-Expose-Headers`

查看:535
本文介绍了CORS - 什么时候返回`Access-Control-Expose-Headers`的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否应该与实体一起返回 Access-Control-Expose-Headers 头字段以响应实际请求?

Should the Access-Control-Expose-Headers header field be returned along with an entity in response to an 'actual' request?

或者应该只响应CORS预检请求才返回?

Or should it only be returned in response to a CORS preflight request?

还是两者?

推荐答案

根据下页的流程图,答案只是为了回应实际的要求: http://www.html5rocks.com/en/tutorials/cors/#toc-cors-server-flowchart

According to the flow chart on the following page, the answer is only in response to the actual request: http://www.html5rocks.com/en/tutorials/cors/#toc-cors-server-flowchart

这篇关于CORS - 什么时候返回`Access-Control-Expose-Headers`的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆