Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Caching response with Authorization header #2606
From @bohdyone on Friday, June 30, 2017 6:03:10 PM
Looks like caching not supported if Authorization header is present. This is different to the spec, in that Public responses may still be cached even with this header. This use case is useful if you have a static app token in the Authorization header and set the Vary header to vary based on Authorization.
Copied from original issue: aspnet/ResponseCaching#128
From @RehanSaeed on Tuesday, July 18, 2017 9:19:56 AM
When the Authorization HTTP header is present, the cached entry should be taken, the Authorization and Set-Cookie HTTP headers on it should be updated from the current request and the response returned. aspnet/ResponseCaching#52 would mean we could do this ourselves but I think the above should be built in.
From @mabakay on Monday, October 16, 2017 12:18:58 AM
@RehanSaeed you're asking wrong questions. Caching response isn't connected with presence or not of some headers but whether served response is customisable or not (e.g., whole server need authentication but it responde with common data for everyone).