0
我正在配置使用IIS 7.5上的CORS的Web服務應用程序。每次我們添加一個自定義標題時,無論它是在web.config還是在GUI中,它都會將自定義標題值的兩個副本發送到客戶端,從而打破CORS模型。在CORS進程中從IIS接收的重複頭文件
HTTP/1.1 200 OK
Cache-Control: private
Transfer-Encoding: chunked
Content-Type: application/json; charset=UTF-8
Server: Microsoft-IIS/7.5
X-Experience-API-Version: 1.0.1
Access-Control-Allow-Origin: *, *
Access-Control-Allow-Methods: HEAD,GET,POST,PUT,DELETE
Access-Control-Allow-Headers: Content-Type,Content-Length,Authorization,If-Match,If-None-Match,X-Experience-API-Version,X-Experience-API-Consistent-Through, Content-Type,Content-Length,Authorization,If-Match,If-None-Match,X-Experience-API-Version,X-Experience-API-Consistent-Through
Access-Control-Expose-Headers: ETag,Last-Modified,Cache-Control,Content-Type,Content-Length,WWW-Authenticate,X-Experience-API-Version,X-Experience-API-Consistent-Through, **ETag,Last-Modified,Cache-Control,Content-Type,Content-Length,WWW-Authenticate,X-Experience-API-Version,X-Experience-API-Consistent-Through**
X-Powered-By: ASP.NET
Date: Thu, 30 Jan 2014 00:43:58 GMT
請注意Origin,Expose和Allow Headers部分中的重複項。現在爲了防止複雜化,我們只在Web站點級設置它,但最初似乎是在我們將這些添加到web.config文件時開始的。
任何幫助將不勝感激。