<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: A Mechanism to Help Write Web Application Firewalls for Nginx</title>
	<atom:link href="http://blog.zhuzhaoyuan.com/2012/01/a-mechanism-to-help-write-web-application-firewalls-for-nginx/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.zhuzhaoyuan.com/2012/01/a-mechanism-to-help-write-web-application-firewalls-for-nginx/</link>
	<description></description>
	<pubDate>Sat, 19 May 2012 14:02:14 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jasmine</title>
		<link>http://blog.zhuzhaoyuan.com/2012/01/a-mechanism-to-help-write-web-application-firewalls-for-nginx/comment-page-1/#comment-2063</link>
		<dc:creator>Jasmine</dc:creator>
		<pubDate>Sun, 19 Feb 2012 23:32:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.zhuzhaoyuan.com/?p=210#comment-2063</guid>
		<description>You'd also have to egnarle your limits in /etc/limits.conf (or where ever it is on your distro of choice), if you'd have 1000s of users simultaneous, you could have a bottleneck if there are too many  files  open.</description>
		<content:encoded><![CDATA[<p>You&#8217;d also have to egnarle your limits in /etc/limits.conf (or where ever it is on your distro of choice), if you&#8217;d have 1000s of users simultaneous, you could have a bottleneck if there are too many  files  open.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anders</title>
		<link>http://blog.zhuzhaoyuan.com/2012/01/a-mechanism-to-help-write-web-application-firewalls-for-nginx/comment-page-1/#comment-2062</link>
		<dc:creator>Anders</dc:creator>
		<pubDate>Sat, 18 Feb 2012 21:47:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.zhuzhaoyuan.com/?p=210#comment-2062</guid>
		<description>sorry for posting unrelated question here:

First of all, your blog has been very helpful for nginx newbies. Thanks a lot!

I am playing with your hello world module and attached it with NGX_HTTP_ACCESS_PHASE. As you may know, if you apply the basic auth on a uri that is backed by a remote resource through reversed proxy, the authentication header is carried over and hit the remote resource. For lots of cases, this will invoke the auth mechanism of the remote resource, say tomcat.

I understand you can bypass it by proxy_set_header Authorization ""; in the config file. But I am wondering if there is a way to suppress/remove it from the header_in in my module?

I tried: r-&gt;headers_in.authorization-&gt;value.len=0;

It appears to work. But I don't know this could lead any memory leak since the authorization is a pointer and probably the memory is dynamically allocated for the request.

Could you shed some light here?

Thxs!

Anders</description>
		<content:encoded><![CDATA[<p>sorry for posting unrelated question here:</p>
<p>First of all, your blog has been very helpful for nginx newbies. Thanks a lot!</p>
<p>I am playing with your hello world module and attached it with NGX_HTTP_ACCESS_PHASE. As you may know, if you apply the basic auth on a uri that is backed by a remote resource through reversed proxy, the authentication header is carried over and hit the remote resource. For lots of cases, this will invoke the auth mechanism of the remote resource, say tomcat.</p>
<p>I understand you can bypass it by proxy_set_header Authorization &#8220;&#8221;; in the config file. But I am wondering if there is a way to suppress/remove it from the header_in in my module?</p>
<p>I tried: r-&gt;headers_in.authorization-&gt;value.len=0;</p>
<p>It appears to work. But I don&#8217;t know this could lead any memory leak since the authorization is a pointer and probably the memory is dynamically allocated for the request.</p>
<p>Could you shed some light here?</p>
<p>Thxs!</p>
<p>Anders</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joshua</title>
		<link>http://blog.zhuzhaoyuan.com/2012/01/a-mechanism-to-help-write-web-application-firewalls-for-nginx/comment-page-1/#comment-2058</link>
		<dc:creator>Joshua</dc:creator>
		<pubDate>Sun, 12 Feb 2012 07:05:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.zhuzhaoyuan.com/?p=210#comment-2058</guid>
		<description>@Abioy:
是的。在Nginx的phase里是无法完美处理body的，所以我们把input body filter加上了 :)</description>
		<content:encoded><![CDATA[<p>@Abioy:<br />
是的。在Nginx的phase里是无法完美处理body的，所以我们把input body filter加上了 <img src='http://blog.zhuzhaoyuan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abioy</title>
		<link>http://blog.zhuzhaoyuan.com/2012/01/a-mechanism-to-help-write-web-application-firewalls-for-nginx/comment-page-1/#comment-2057</link>
		<dc:creator>Abioy</dc:creator>
		<pubDate>Sun, 12 Feb 2012 02:21:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.zhuzhaoyuan.com/?p=210#comment-2057</guid>
		<description>Cool! Tengine把input filter给做了？我们某个服务由于已经在ACCESS PHASE中处理body，便直接在该PHASE加入了防御。</description>
		<content:encoded><![CDATA[<p>Cool! Tengine把input filter给做了？我们某个服务由于已经在ACCESS PHASE中处理body，便直接在该PHASE加入了防御。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tricky1997</title>
		<link>http://blog.zhuzhaoyuan.com/2012/01/a-mechanism-to-help-write-web-application-firewalls-for-nginx/comment-page-1/#comment-2055</link>
		<dc:creator>tricky1997</dc:creator>
		<pubDate>Thu, 19 Jan 2012 10:15:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.zhuzhaoyuan.com/?p=210#comment-2055</guid>
		<description>请问，为什么不通过入侵检测工具（例如snort）来防止hash Dos，而要在nginx里加功能呢？</description>
		<content:encoded><![CDATA[<p>请问，为什么不通过入侵检测工具（例如snort）来防止hash Dos，而要在nginx里加功能呢？</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason.Lee</title>
		<link>http://blog.zhuzhaoyuan.com/2012/01/a-mechanism-to-help-write-web-application-firewalls-for-nginx/comment-page-1/#comment-2054</link>
		<dc:creator>Jason.Lee</dc:creator>
		<pubDate>Wed, 18 Jan 2012 06:20:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.zhuzhaoyuan.com/?p=210#comment-2054</guid>
		<description>不仅仅是佩服</description>
		<content:encoded><![CDATA[<p>不仅仅是佩服</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joshua</title>
		<link>http://blog.zhuzhaoyuan.com/2012/01/a-mechanism-to-help-write-web-application-firewalls-for-nginx/comment-page-1/#comment-2053</link>
		<dc:creator>Joshua</dc:creator>
		<pubDate>Wed, 18 Jan 2012 03:25:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.zhuzhaoyuan.com/?p=210#comment-2053</guid>
		<description>@james,
&gt;= PAGE_SIZE的内存回收更有意义</description>
		<content:encoded><![CDATA[<p>@james,<br />
>= PAGE_SIZE的内存回收更有意义</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: james</title>
		<link>http://blog.zhuzhaoyuan.com/2012/01/a-mechanism-to-help-write-web-application-firewalls-for-nginx/comment-page-1/#comment-2052</link>
		<dc:creator>james</dc:creator>
		<pubDate>Wed, 18 Jan 2012 02:57:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.zhuzhaoyuan.com/?p=210#comment-2052</guid>
		<description>我的意思是 比如linux的pagesize是 4k ，它为什么是4k-1</description>
		<content:encoded><![CDATA[<p>我的意思是 比如linux的pagesize是 4k ，它为什么是4k-1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joshua</title>
		<link>http://blog.zhuzhaoyuan.com/2012/01/a-mechanism-to-help-write-web-application-firewalls-for-nginx/comment-page-1/#comment-2051</link>
		<dc:creator>Joshua</dc:creator>
		<pubDate>Wed, 18 Jan 2012 01:50:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.zhuzhaoyuan.com/?p=210#comment-2051</guid>
		<description>@james,
大于PAGE_SIZE或pool的内存nginx会单独存放一个链表，这个是可能被回收的，以节约内存。请阅读src/core/ngx_palloc.c和我之前写的nginx internals文档中讲内存池实现部分</description>
		<content:encoded><![CDATA[<p>@james,<br />
大于PAGE_SIZE或pool的内存nginx会单独存放一个链表，这个是可能被回收的，以节约内存。请阅读src/core/ngx_palloc.c和我之前写的nginx internals文档中讲内存池实现部分</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: james</title>
		<link>http://blog.zhuzhaoyuan.com/2012/01/a-mechanism-to-help-write-web-application-firewalls-for-nginx/comment-page-1/#comment-2050</link>
		<dc:creator>james</dc:creator>
		<pubDate>Wed, 18 Jan 2012 01:20:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.zhuzhaoyuan.com/?p=210#comment-2050</guid>
		<description>#define NGX_MAX_ALLOC_FROM_POOL  (ngx_pagesize - 1)

请教，为什么是这样</description>
		<content:encoded><![CDATA[<p>#define NGX_MAX_ALLOC_FROM_POOL  (ngx_pagesize - 1)</p>
<p>请教，为什么是这样</p>
]]></content:encoded>
	</item>
</channel>
</rss>

