diff xml/en/docs/njs/reference.xml @ 2441:080581ce888d

Added note to r.headersIn in njs Reference.
author Yaroslav Zhuravlev <yar@nginx.com>
date Mon, 07 Oct 2019 14:41:16 +0300
parents 3b7223f9aac8
children 32b945768dea
line wrap: on
line diff
--- a/xml/en/docs/njs/reference.xml	Thu Oct 03 19:39:57 2019 +0300
+++ b/xml/en/docs/njs/reference.xml	Mon Oct 07 14:41:16 2019 +0300
@@ -9,7 +9,7 @@
 <article name="Reference"
         link="/en/docs/njs/reference.html"
         lang="en"
-        rev="30">
+        rev="31">
 
 <section id="summary">
 
@@ -56,6 +56,17 @@
 For example, the <literal>Foo</literal> header
 can be accessed with the syntax <literal>headersIn.foo</literal>
 or <literal>headersIn['Foo']</literal>
+<note>
+For headers that can appear multiple times such as
+<header>Cookie</header> or <header>X-Forwarded-For</header>,
+only the first value will be returned.
+To get all cookies,
+<literal>r.variables.http_cookie</literal>
+should be used.
+To get the <literal>name</literal> cookie,
+<literal>r.variables["cookie_<value>name</value>"]</literal>
+should be used.
+</note>
 </para>
 </tag-desc>