Mercurial > hg > nginx-site
diff xml/ru/docs/http/ngx_http_headers_module.xml @ 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 | d7740f42b00a |
children | 2a3c58dcb3e8 |
line wrap: on
line diff
--- a/xml/ru/docs/http/ngx_http_headers_module.xml +++ b/xml/ru/docs/http/ngx_http_headers_module.xml @@ -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 @24h; expires 0; expires -1; expires epoch; +expires $expires; add_header Cache-Control private; </example> </para> @@ -141,6 +142,19 @@ expires @15h30m; <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>