CORS headers not being refreshed due to OutputCache in MVC 4 using the Thinktecture IdentityModel package

StackOverflow https://stackoverflow.com/questions/21475318

Вопрос

Presently I am using Thinktecture package for CORS support with my MVC 4 application. on adding the output cache attribute for a method, the CORS support is lost because the HTTP headers are probably cached and the ORIGIN is not modified w.r.t. the request. I know I could use memory cache but it is more tedious.

Это было полезно?

Решение

using VaryByHeader

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top