avoiding disk cache on proxy ?

Jonathan Vanasco nginx at 2xlp.com
Tue Jan 16 10:38:34 MSK 2007


On Jan 15, 2007, at 9:44 PM, Ezra Zygmuntowicz wrote:
> Hey Jonathan-

> 	Here is my proxy settings:
>
>       proxy_set_header  X-Real-IP  $remote_addr;
>       proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
>       proxy_set_header Host $http_host;
>       proxy_redirect false;
>       proxy_max_temp_file_size 0;
>
>
> the proxy_max_temp_file_size 0; one is the ticket. That will stop  
> it from buffering to disk.

Thanks!  Thats exactly what I needed.

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 ?

// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -
| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -
| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - 





More information about the nginx mailing list