-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache-Control should also include 'public' for public document GET requests #189
Comments
AFAIK, shared caches generally do not happily serve content that was requested with an
https://www.rfc-editor.org/rfc/rfc9111#name-storing-responses-in-caches I agree that adding @DougReeder Did you find a specific cache implementation that has this problem? |
Good catch on the Authorization header preventing caching - that's probably why we haven't observed a problem in practice.
|
Forgot about Kerberos. So yes, the addition should go somewhere around here I think:
|
As @raucao noted, request with credentials are not normally cacheable. An unauthenticated request would evoke a 401 status, which is also not cacheable, which closes off a theoretical DOS attack. Adding Cache-Control: private allows a client to DOS itself (I think) but doesn't help in any scenario I currently know of, so I withdraw the recommendation that Cache-Control: private be added. So, it appears to me that implementations should add Cache-Control: public to public documents (but not public directories), along with the no-cache for all documents and directories. |
without
private
(in addition tono-cache
in the Cache-Control header for GET requests, server-side caches are allowed to cache responses, creating a large security hole. That is, a server-side cache would happily serve RS content to anyone on the internet, without the authentication of the RS server.The HTTP spec says HEAD requests MUST send the same headers as GET requests, the spec should probably include HEAD requests in that sentence.
The text was updated successfully, but these errors were encountered: