documented how to clear a response header.

This commit is contained in:
agentzh (章亦春) 2010-11-04 17:29:18 +08:00
Родитель 226a207df8
Коммит 3811a28b89
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -273,11 +273,15 @@ before sending out the response headers.
ngx.header[HEADER_NAME]
-----------------------
Set/add response headers. Underscores (_) in the header names will be replaced by dashes (-).
Set/add/clear response headers. Underscores (_) in the header names will be replaced by dashes (-).
ngx.header.content_type = 'text/plain';
ngx.header["X-My-Header"] = 'blah blah';
Setting a slot to nil effectively removes it from the response headers:
ngx.header["X-My-Header"] = nil;
ngx.exec(uri, args)
----------