@@ -55,14 +55,18 @@ set_common_permission_headers(ReqData0, EndpointModule) ->
5555 lists :foldl (fun (Fun , ReqData ) ->
5656 Fun (ReqData , EndpointModule )
5757 end , ReqData0 ,
58- [fun set_csp_headers /2 ,
58+ [fun set_etag_based_cache_headers /2 ,
59+ fun set_csp_headers /2 ,
5960 fun set_hsts_headers /2 ,
6061 fun set_cors_headers /2 ,
6162 fun set_content_type_options_header /2 ,
6263 fun set_xss_protection_header /2 ,
6364 fun set_frame_options_header /2 ]).
6465
66+ set_etag_based_cache_headers (ReqData0 , _Module ) ->
67+ cowboy_req :set_resp_header (<<" cache-control" >>, <<" public, max-age=0, must-revalidate" >>, ReqData0 ).
68+
6569set_no_cache_headers (ReqData0 , _Module ) ->
66- ReqData1 = cowboy_req :set_resp_header (<<" cache-control" >>, <<" no-cache, no-store, must-revalidate" >>, ReqData0 ),
70+ ReqData1 = cowboy_req :set_resp_header (<<" cache-control" >>, <<" no-cache, no-store, max-age=0, must-revalidate" >>, ReqData0 ),
6771 ReqData2 = cowboy_req :set_resp_header (<<" pragma" >>, <<" no-cache" >>, ReqData1 ),
6872 cowboy_req :set_resp_header (<<" expires" >>, rabbit_data_coercion :to_binary (0 ), ReqData2 ).
0 commit comments