# HG changeset patch # User Yaroslav Zhuravlev # Date 1418839920 -10800 # Node ID ab0ebdd7ddac5fa31631ffcdd23b6c5bbd68a161 # Parent 90922e31756d0969cc81d10b4be40290638e6ce0 Documented variables support in the expires directive. diff -r 90922e31756d -r ab0ebdd7ddac xml/en/docs/http/ngx_http_headers_module.xml --- 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 @@ + rev="7">
@@ -33,6 +33,7 @@ expires 0; expires -1; expires epoch; +expires $expires; add_header Cache-Control private; @@ -142,6 +143,19 @@ header fields. + +The last parameter value can contain variables (1.7.9): + +map $sent_http_content_type $expires { + default off; + application/pdf 42d; + ~image/ max; +} + +expires $expires; + + +
diff -r 90922e31756d -r ab0ebdd7ddac xml/ru/docs/http/ngx_http_headers_module.xml --- 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 @@ + rev="7">
@@ -33,6 +33,7 @@ expires 0; expires -1; expires epoch; +expires $expires; add_header Cache-Control private; @@ -141,6 +142,19 @@
Expires
и
Cache-Control
в заголовке ответа. + +В значении последнего параметра можно использовать переменные (1.7.9): + +map $sent_http_content_type $expires { + default off; + application/pdf 42d; + ~image/ max; +} + +expires $expires; + + +