title: kubernetes nginx ingress controller / caching static assets
body: <p>I have a problem about the images returned via the apps running behind the nginx ingress controller. They always returns 200 instead of an expected 304 once visited.</p>
  
  <p>Digging around, i've found out about the ability to add specific blocks within the servers; so added the following under metadata > annotations :</p>
  
  <pre><code> ingress.kubernetes.io/server-snippets: |
     location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
       expires 30d;
       add_header Pragma public;
       add_header Cache-Control "public";
     }
  </code></pre>
  
  <p>The problems persists, so still getting a permanent 200; "ssh'ing" into the nginx pod and doing a cat on the nginx.conf created, I don't see this block appearing anywhere</p>
  
  <p>So am kind of lost about how to improve it. I'm using kube-lego, but did not found out if it could have an impact here</p>