Posted By

vasilije on 12/22/08


Tagged

conf nginx


Versions (?)

Nginx force download for non image static files


 / Published in: Other
 

  1. server{
  2. listen 80;
  3. server_name test.localhost;
  4. location / {
  5. root /Users/vasil/test;
  6. if ($request_filename !~* ^.*?\.(jpg)|(png)|(gif)){
  7. add_header Content-Disposition: "$request_filename";
  8. }
  9. }
  10. }

Report this snippet  

You need to login to post a comment.