9 messages in ru.sysoev.nginxRe: avoiding disk cache on proxy ?
FromSent OnAttachments
Jonathan VanascoJan 15, 2007 1:31 pm 
Ezra ZygmuntowiczJan 15, 2007 6:43 pm 
Jonathan VanascoJan 15, 2007 11:38 pm 
Igor SysoevJan 16, 2007 12:09 pm 
Igor SysoevJan 16, 2007 12:11 pm 
Igor SysoevJan 16, 2007 12:17 pm 
Jonathan VanascoJan 16, 2007 12:44 pm 
Igor SysoevJan 16, 2007 12:58 pm 
Aleksandar LazicJan 16, 2007 1:41 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: avoiding disk cache on proxy ?Actions...
From:Igor Sysoev (is-G@public.gmane.org)
Date:Jan 16, 2007 12:17:12 pm
List:ru.sysoev.nginx

On Tue, 16 Jan 2007, Jonathan Vanasco wrote:

Just wondering on these lines though:

proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

on my system, i use this:

proxy_set_header Host $host; proxy_set_header X-Forwarded-For $remote_addr;

which is where i go off into a tangent-

isn't it bad form / dangerous to rely on x-forwarded-for from the client for anything? shouldn't you force it to be $remote_addr ( it defaults to that if there is no x-forwarded-for header ) in almost any situation ?

Of course, a client "X-Forwarded-For" is not reliable, but you may log the header for some reason.

I usually pass a client address in "X-Real-IP" header and the "X-Forwarded-For" header is passed as is.