【发布时间】:2016-12-18 20:14:31
【问题描述】:
非 2XX 状态代码响应是否仍应包含 CORS 特定标头,例如 Access-Control-Allow-Origin、Access-Control-Allow-Methods 和 Access-Control-Max-Age?这对客户来说是否有意义?
例如:
➜ api git:(master) ✗ curl -i http://127.0.0.1:9000/dfas
HTTP/1.1 404 Not Found
Connection: close
Server: Node.js v6.3.1
Cache-Control: no-cache, no-store
Access-Control-Max-Age: 300
Access-Control-Allow-Origin: *
Content-Type: application/json
Content-Length: 60
Date: Thu, 11 Aug 2016 22:58:33 GMT
{"code":"ResourceNotFound","message":"/dfas does not exist"}
【问题讨论】:
标签: http cors http-status-codes access-control