Asp.net mvc 4 由于使用Thinktecture IdentityModel包在MVC 4中使用OutputCache,因此未刷新CORS标头

Asp.net mvc 4 由于使用Thinktecture IdentityModel包在MVC 4中使用OutputCache,因此未刷新CORS标头,asp.net-mvc-4,cors,outputcache,thinktecture-ident-model,Asp.net Mvc 4,Cors,Outputcache,Thinktecture Ident Model,目前,我在MVC4应用程序中使用Thinktecture软件包来支持CORS。在为方法添加output cache属性时,CORS支持将丢失,因为HTTP头可能已被缓存,并且源代码未在请求中修改。我知道我可以使用内存缓存,但它更乏味。使用VaryByHeader [OutputCache(Duration=int.MaxValue,VaryByHeader=“origin;host”)]

目前,我在MVC4应用程序中使用Thinktecture软件包来支持CORS。在为方法添加output cache属性时,CORS支持将丢失,因为HTTP头可能已被缓存,并且源代码未在请求中修改。我知道我可以使用内存缓存,但它更乏味。

使用VaryByHeader

[OutputCache(Duration=int.MaxValue,VaryByHeader=“origin;host”)]