Mercurial > hg > nginx-site
comparison 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 |
comparison
equal
deleted
inserted
replaced
2440:7a353370ffcd | 2441:080581ce888d |
---|---|
7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> | 7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> |
8 | 8 |
9 <article name="Reference" | 9 <article name="Reference" |
10 link="/en/docs/njs/reference.html" | 10 link="/en/docs/njs/reference.html" |
11 lang="en" | 11 lang="en" |
12 rev="30"> | 12 rev="31"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 <link doc="index.xml">njs</link> provides objects, methods and properties | 17 <link doc="index.xml">njs</link> provides objects, methods and properties |
54 incoming headers object, read-only. | 54 incoming headers object, read-only. |
55 <para> | 55 <para> |
56 For example, the <literal>Foo</literal> header | 56 For example, the <literal>Foo</literal> header |
57 can be accessed with the syntax <literal>headersIn.foo</literal> | 57 can be accessed with the syntax <literal>headersIn.foo</literal> |
58 or <literal>headersIn['Foo']</literal> | 58 or <literal>headersIn['Foo']</literal> |
59 <note> | |
60 For headers that can appear multiple times such as | |
61 <header>Cookie</header> or <header>X-Forwarded-For</header>, | |
62 only the first value will be returned. | |
63 To get all cookies, | |
64 <literal>r.variables.http_cookie</literal> | |
65 should be used. | |
66 To get the <literal>name</literal> cookie, | |
67 <literal>r.variables["cookie_<value>name</value>"]</literal> | |
68 should be used. | |
69 </note> | |
59 </para> | 70 </para> |
60 </tag-desc> | 71 </tag-desc> |
61 | 72 |
62 <tag-name id="r_headers_out"><literal>r.headersOut{}</literal></tag-name> | 73 <tag-name id="r_headers_out"><literal>r.headersOut{}</literal></tag-name> |
63 <tag-desc> | 74 <tag-desc> |