<font size=2 face="sans-serif">Hi</font>
<br>
<br><font size=2 face="sans-serif">My backend is IBM Lotus Domino and its
HTTP task. I have application that has admin panel thats been used with
end-user's browser. </font>
<br><font size=2 face="sans-serif">Currently i am using cache but that
admin panel goes crazy because of caching. So, goal is to prevent caching
if user is authenticated.</font>
<br><font size=2 face="sans-serif">IBM Lotus Domino uses Cookie named DomAuthSessId
which has session id.</font>
<br>
<br><font size=2 face="sans-serif">So on global level i have configured:</font>
<br>
<br><font size=2 face="sans-serif">.....</font>
<br><font size=2 face="sans-serif">http {</font>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; proxy_cache_path &nbsp;/usr/share/nginx/cache
&nbsp;levels=1:2 &nbsp; keys_zone=one:10m max_size=1G;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; proxy_temp_path &nbsp;
/usr/share/nginx/tmp;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; proxy_cache_key &nbsp;
&quot;$scheme$host$request_uri&quot;;</font>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; proxy_cache_valid 200
302 5m;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; proxy_cache_valid 301
1h;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; proxy_cache_valid any
1m;</font>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp;proxy_cache one;</font>
<br>
<br><font size=2 face="sans-serif">.... and so on</font>
<br>
<br><font size=2 face="sans-serif">and on virtual server level</font>
<br>
<br><font size=2 face="sans-serif">server {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;server_name &nbsp;</font><a href=www.somedomain.fi><font size=2 face="sans-serif">www.somedomain.fi</font></a><font size=2 face="sans-serif">;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;default_type text/html;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;root &nbsp; &nbsp; &nbsp;
&nbsp; /some/directory;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;location / {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; proxy_pass </font><a href=http://some.ip.add.ress/><font size=2 face="sans-serif">http://some.ip.add.ress</font></a><font size=2 face="sans-serif">;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;}</font>
<br><font size=2 face="sans-serif">.....</font>
<br><font size=2 face="sans-serif">}</font>
<br>
<br><font size=2 face="sans-serif">Would this work if i do something like
this?</font>
<br>
<br><font size=2 face="sans-serif">&nbsp; location / {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; # if authenticated
domino user, disable cache</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; if ($http_cookie
~* &quot;DomAuthSessId&quot;) {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;proxy_cache_valid
&nbsp;200 302 304 none;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;proxy_cache_valid
&nbsp;301 none;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; }</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; proxy_pass </font><a href=http://some.ip.add.ress/><font size=2 face="sans-serif">http://some.ip.add.ress</font></a>
<br><font size=2 face="sans-serif">&nbsp;}</font>
<br>
<br>
<br><font size=2 face="sans-serif">Or any ideas how it should be done?</font>
<br>
<br>
<br><font size=2 face="sans-serif"><br>
Terveisin/Regards,<br>
 &nbsp; Pekka Panula, Sofor Oy - Jatkuvat palvelut<br>
<br>
</font>