Feature #3448

Ensure proper cache control headers across Synnefo

Added by Vangelis Koukis over 7 years ago. Updated almost 7 years ago.

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

related to Synnefo - Feature #3358: Single decorator for handling API calls, with proper logg... Closed 03/03/2013

Associated revisions

Revision 72bf812d
Added by Christos Stavrakakis over 7 years ago

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'

Refs #3358 #3448

History

#1 Updated by Stratos Psomadakis over 7 years ago

Also add no_store cache control:

+        patch_cache_control(response, no_store=True)

#2 Updated by Christos Stavrakakis over 7 years ago

  • Status changed from Assigned to Feedback

#3 Updated by Christos Stavrakakis almost 7 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF