Middleware to add never_cache headers to everything (#51)
This commit is contained in:
		
							parent
							
								
									ce10e021f6
								
							
						
					
					
						commit
						6598d9f737
					
				
					 2 changed files with 8 additions and 0 deletions
				
			
		
							
								
								
									
										7
									
								
								pinaxcon/disable_cscache.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								pinaxcon/disable_cscache.py
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | |||
| from django.utils.cache import add_never_cache_headers | ||||
| 
 | ||||
| class DisableClientSideCachingMiddleware(object): | ||||
|     def process_response(self, request, response): | ||||
|         add_never_cache_headers(response) | ||||
|         return response | ||||
| 
 | ||||
|  | @ -115,6 +115,7 @@ MIDDLEWARE_CLASSES = [ | |||
|     'wagtail.wagtailcore.middleware.SiteMiddleware', | ||||
|     'wagtail.wagtailredirects.middleware.RedirectMiddleware', | ||||
|     'pinaxcon.monkey_patch.MonkeyPatchMiddleware', | ||||
|     'pinaxcon.disable_cscache.DisableClientSideCachingMiddleware', | ||||
| ] | ||||
| 
 | ||||
| ROOT_URLCONF = "pinaxcon.urls" | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Scott Bragg
						Scott Bragg