Feature #3448
Ensure proper cache control headers across Synnefo
Status: | Closed | Start date: | 03/13/2013 | |
---|---|---|---|---|
Priority: | High | Due date: | ||
Assignee: | Christos Stavrakakis | % Done: | 0% |
|
Category: | Cyclades API | Spent time: | - | |
Target version: | 0.14.0 |
Description
Ensure proper Vary:, Cache-Control headers across Synnefo, inside a single API request handler, see #3358.
Responses should contain at least:
Cache-Control: no-cache, no-store, must-revalidate, max-age=0 Vary: X-Auth-Token
Proposed patch in api_request
:
+ patch_vary_headers(response, ('X-Auth-Token',)) + patch_cache_control(response, no_cache=True) + patch_cache_control(response, no_store=True) + patch_cache_control(response, must_revalidate=True)
before returning a response.
Related issues
Associated revisions
Implement single decorator for handling API calls
Create a single decorator for API methods to be used be accross all
synnefo. This decorator does the following:
- Proper logging of 5xx faults and unexpected errors
- Authentication with Astakos using snf-astakos-client
- Sets proper HTTP response and cache control headers
Also move some common functions from various apps to
'snf_django.lib.api.utils'
History
#1 Updated by Stratos Psomadakis over 10 years ago
Also add no_store cache control:
+ patch_cache_control(response, no_store=True)
#2 Updated by Christos Stavrakakis over 10 years ago
- Status changed from Assigned to Feedback
#3 Updated by Christos Stavrakakis over 9 years ago
- Status changed from Feedback to Closed