﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
1313	"If ""return"" rules are above than ""expires"", then ""expires"" stop working."	nonegit@…		"server{
...
[1] location ~* \.(css|js|jpg|zip)$ {valid_referers server_names;if ($invalid_referer){return 444;}}
[2] location ~ /customer/downloads/ {valid_referers server_names;if ($invalid_referer){return 444;}}
[3] location ~* \.(css|html|js|jpg)$ {expires 2h;}
...
}

Current result:
/customer/downloads/ (=index.html) --- returns ""Cache-Control: max-age=7200"" header
/customer/downloads/xxx.css,
/customer/downloads/xxx.jpg --- doesn't return Cache header

Expected result:
/customer/downloads/xxx.css,
/customer/downloads/xxx.jpg must return cache control header, like html.

Why is this happening?


Note:
1. If I move [3] to above [1], [1] and [2] rules are completely ignored."	task	closed	major		nginx-core	1.10.x	invalid		pkg-nginx-maintainers@…	Linux NGX 4.9.0-3-686-pae #1 SMP Debian 4.9.30-2+deb9u2 (2017-06-26) i686 GNU/Linux	"nginx version: nginx/1.10.3
built with OpenSSL 1.1.0d  26 Jan 2017 (running with OpenSSL 1.1.0f  25 May 2017)
TLS SNI support enabled

Debian's latest
packages.debian.org/stretch/nginx-extras"
