taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

microcache_fcgi_auth.conf (2150B)


      1 # -*- mode: nginx; mode: flyspell-prog;  ispell-local-dictionary: "american" -*-
      2 
      3 ## The cache zone referenced.
      4 fastcgi_cache microcache;
      5 ## The cache key.
      6 fastcgi_cache_key $cache_uid@$scheme$request_method$host$request_uri;
      7 
      8 ## For 200 and 301 make the cache valid for 15s.
      9 fastcgi_cache_valid 200 301 15s;
     10 ## For 302 make it valid for 1 minute.
     11 fastcgi_cache_valid 302 1m;
     12 ## For 404 make it valid 1 second.
     13 fastcgi_cache_valid 404 1s;
     14 ## If there are any upstream errors use whatever it is available.
     15 fastcgi_cache_use_stale error timeout invalid_header updating http_500;
     16 ## The Cache-Control and Expires headers should be delivered untouched
     17 ## from the upstream to the client.
     18 fastcgi_ignore_headers Cache-Control Expires;
     19 fastcgi_pass_header Set-Cookie;
     20 fastcgi_pass_header Cookie;
     21 ## Bypass the cache.
     22 # fastcgi_cache_bypass $no_auth_cache;
     23 # fastcgi_no_cache $no_auth_cache;
     24 ## Add a cache miss/hit status header.
     25 add_header X-Micro-Cache $upstream_cache_status;
     26 ## To avoid any interaction with the cache control headers we expire
     27 ## everything on this location immediately.
     28 expires epoch;
     29 
     30 ## Enable clickjacking protection in modern browsers. Available in
     31 ## IE8 also. See
     32 ## https://developer.mozilla.org/en/The_X-FRAME-OPTIONS_response_header
     33 ## This may conflicts with pseudo streaming (at least with Nginx version 1.0.12).
     34 ## Uncomment the line below if you're not using media streaming.
     35 ## For sites *not* using frames uncomment the line below.
     36 #add_header X-Frame-Options DENY;
     37 ## For sites *using* frames uncomment the line below.
     38 #add_header X-Frame-Options SAMEORIGIN;
     39 
     40 ## Block MIME type sniffing on IE.
     41 add_header X-Content-Options nosniff;
     42 
     43 ## If you're using a Nginx version greater than 1.1.11 then uncomment
     44 ## the line below. See:
     45 ## http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_cache_lock
     46 ## Cache locking mechanism for protecting the backend of too many
     47 ## simultaneous requests.
     48 #fastcgi_cache_lock on;
     49 ## The default timeout, i.e., the time to way before forwarding the
     50 ## second request upstream if no reply as arrived in the meantime is 5s.
     51 #fastcgi_cache_lock_timeout 8000; # in miliseconds.