Strange problem with expires?

Lucas Rolff lucas at
Tue Mar 1 20:48:31 UTC 2022

= is for exact matches, so unless your static file is called / - it obviously won’t match that exact location.

No modifier (so no =) means it’s a prefix

Get Outlook for iOS<>
From: Grzegorz Kulewski <gk at>
Sent: Wednesday, March 2, 2022 4:40:48 AM
To: nginx at <nginx at>
Subject: Strange problem with expires?


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?

Grzegorz Kulewski

nginx mailing list -- nginx at
To unsubscribe send an email to nginx-leave at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list