title: Spring Security - No way to avoid cache-control
body: <p>I have an application and use a controller mapping of spring to load images to my users. (InputStream, response, etc).</p>
  
  <p>In my controller I set headers to cache-control, baseaded on files, etc. But there's always pragma: no-cache and Cache-Control:"max-age=0" inside all requests, and that's replace my response settings.</p>
  
  <p>I was trying everything to solve this, but nothing works.</p>
  
  <p>I already read all page and try everything I found about that:
  <a href="http://docs.spring.io/autorepo/docs/spring-security/3.2.0.CI-SNAPSHOT/reference/html/headers.html" rel="noreferrer">http://docs.spring.io/autorepo/docs/spring-security/3.2.0.CI-SNAPSHOT/reference/html/headers.html</a></p>
  
  <p>My spring security.xml has:</p>
  
  <pre><code>    &lt;security:headers disabled="true"/&gt;
  </code></pre>
  
  <p>Anyone have a good idea to solve this?</p>
  
  <p>Remember that to load the images I need to load through my controller, I never call static directly.</p>