<p>in kubernetes V 1.14.5   with ingress controller nginx-ingress-controller:0.21.0-rancher3 .I have below issue:</p>
<p>when userinfo api is called with internal service address (form inside cluster), it response fine (token is invalid). as below screenshot</p>
<p><a href="https://i.stack.imgur.com/KIvC0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KIvC0.png" alt="  ((" /></a>
but when that API is called with its ingress name, it responses with list of permission while token is revoked. both requests use same tokens</p>
<p><a href="https://i.stack.imgur.com/lIBp4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lIBp4.png" alt="enter image description here" /></a></p>
<p>I think its related to cache inside Ingress and Ingress Controller but I cant disable it vi annotation configuration</p>

hossein bazrafkan
<p>If you are using the Nginx ingress controller you can use this snippet into the annotation</p>
<pre><code>nginx.ingress.kubernetes.io/configuration-snippet : |
      if ($request_uri ~* \.(js|css|gif|jpe?g|png)) {
        expires 1M;
        add_header Cache-Control &quot;public&quot;;
      }
</code></pre>
<p>inside the configuration, you can keep the simple <strong>Nginx</strong> config</p>
