Advertisement
Guest User

Untitled

a guest
May 14th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.36 KB | None | 0 0
  1. # http section
  2.  
  3. map $http_if_modified_since $last_modified {
  4.     "~*.+" $http_if_modified_since;
  5.     default $date_gmt;
  6. }
  7.  
  8. map $http_if_modified_since $response304 {
  9.     "~*.+" 1;
  10. }
  11.  
  12. # =========================================
  13.  
  14. # server section
  15.  
  16. if ($response304){
  17.     return 304 "Not modified";
  18. }
  19.  
  20. # location
  21. add_header Last-Modified $last_modified;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement