Mercurial > hg > nginx-site
changeset 1375:ab0ebdd7ddac
Documented variables support in the expires directive.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Wed, 17 Dec 2014 21:12:00 +0300 |
parents | 90922e31756d |
children | 6e54b85dfb86 |
files | xml/en/docs/http/ngx_http_headers_module.xml xml/ru/docs/http/ngx_http_headers_module.xml |
diffstat | 2 files changed, 30 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_headers_module.xml Tue Dec 16 17:22:42 2014 +0300 +++ b/xml/en/docs/http/ngx_http_headers_module.xml Wed Dec 17 21:12:00 2014 +0300 @@ -10,7 +10,7 @@ <module name="Module ngx_http_headers_module" link="/en/docs/http/ngx_http_headers_module.html" lang="en" - rev="6"> + rev="7"> <section id="summary"> @@ -33,6 +33,7 @@ expires 0; expires -1; expires epoch; +expires $expires; add_header Cache-Control private; </example> </para> @@ -142,6 +143,19 @@ header fields. </para> +<para> +The last parameter value can contain variables (1.7.9): +<example> +map $sent_http_content_type $expires { + default off; + application/pdf 42d; + ~image/ max; +} + +expires $expires; +</example> +</para> + </directive> </section>
--- a/xml/ru/docs/http/ngx_http_headers_module.xml Tue Dec 16 17:22:42 2014 +0300 +++ b/xml/ru/docs/http/ngx_http_headers_module.xml Wed Dec 17 21:12:00 2014 +0300 @@ -10,7 +10,7 @@ <module name="Модуль ngx_http_headers_module" link="/ru/docs/http/ngx_http_headers_module.html" lang="ru" - rev="6"> + rev="7"> <section id="summary"> @@ -33,6 +33,7 @@ expires 0; expires -1; expires epoch; +expires $expires; add_header Cache-Control private; </example> </para> @@ -141,6 +142,19 @@ <header>Expires</header> и <header>Cache-Control</header> в заголовке ответа. </para> +<para> +В значении последнего параметра можно использовать переменные (1.7.9): +<example> +map $sent_http_content_type $expires { + default off; + application/pdf 42d; + ~image/ max; +} + +expires $expires; +</example> +</para> + </directive> </section>