docs: fixed the documenation for ngx.req.set_header and made it explicit that the modified request headers will be inherited by the subrequests. thanks James Hurst for reporting this nit.
This commit is contained in:
Родитель
d0d9140e11
Коммит
7d5d923400
7
README
7
README
|
@ -2415,8 +2415,11 @@ Nginx API for Lua
|
|||
header_filter_by_lua*, body_filter_by_lua*
|
||||
|
||||
Set the current request's request header named "header_name" to value
|
||||
"header_value", overriding any existing ones. None of the current
|
||||
request's subrequests will be affected.
|
||||
"header_value", overriding any existing ones.
|
||||
|
||||
By default, all the subrequests subsequently initiated by
|
||||
ngx.location.capture and ngx.location.capture_multi will automatically
|
||||
inherit the new header.
|
||||
|
||||
Here is an example of setting the "Content-Length" header:
|
||||
|
||||
|
|
|
@ -2274,7 +2274,8 @@ ngx.req.set_header
|
|||
**context:** *set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua*, body_filter_by_lua*
|
||||
|
||||
Set the current request's request header named `header_name` to value `header_value`, overriding any existing ones.
|
||||
None of the current request's subrequests will be affected.
|
||||
|
||||
By default, all the subrequests subsequently initiated by [ngx.location.capture](http://wiki.nginx.org/HttpLuaModule#ngx.location.capture) and [ngx.location.capture_multi](http://wiki.nginx.org/HttpLuaModule#ngx.location.capture_multi) will automatically inherit the new header.
|
||||
|
||||
Here is an example of setting the `Content-Length` header:
|
||||
|
||||
|
|
|
@ -2208,7 +2208,8 @@ Removing the <code>max_headers</code> cap is strongly discouraged.
|
|||
'''context:''' ''set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua*, body_filter_by_lua''
|
||||
|
||||
Set the current request's request header named <code>header_name</code> to value <code>header_value</code>, overriding any existing ones.
|
||||
None of the current request's subrequests will be affected.
|
||||
|
||||
By default, all the subrequests subsequently initiated by [[#ngx.location.capture|ngx.location.capture]] and [[#ngx.location.capture_multi|ngx.location.capture_multi]] will automatically inherit the new header.
|
||||
|
||||
Here is an example of setting the <code>Content-Length</code> header:
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче