Strange problem with expires?

Grzegorz Kulewski gk at leniwiec.biz
Tue Mar 1 20:49:44 UTC 2022


W dniu 01.03.2022 o 21:43, David Hu pisze:
> On 1 March 2022 20:40:48 UTC, Grzegorz Kulewski <gk at leniwiec.biz> wrote:
>> Hello,
>>
>> I am using nginx 1.21.0 to serve static files for one domain and when I have:
>>
>>                location = / {
>>                        expires epoch;
>>                }
>>
>> expire headers are not added for / but when I remove '=' they are.
>>
>> Is this some bug or just me doing something stupid?
>>
>> Can anybody reproduce it too?
>>
> 
> This is expected behaviour

But... why?

Is it documented somewhere? I don't see it here: http://nginx.org/en/docs/http/ngx_http_headers_module.html#expires and it seems quite normal to me to have different cache settings for main page than for assets.

-- 
Grzegorz Kulewski



More information about the nginx mailing list