ipol-journal / ipolDevel

IPOL demo system development
GNU Affero General Public License v3.0
23 stars 3 forks source link

[sysadmin/configs] Added missing nginx headers for cache control #174

Closed mcolom closed 1 year ago

mcolom commented 1 year ago

Now we have all the headers, including last-modified, etag, and expires.

$ curl --head https://ipolcore.ipol.im/api/core/shared_folder/run/121/D3466405A9EA6A6A82ED89A90A2ED576/input_0.png HTTP/2 200 server: nginx/1.18.0 date: Fri, 12 May 2023 10:32:36 GMT content-type: image/png content-length: 76464 last-modified: Fri, 12 May 2023 10:25:57 GMT etag: "645e1435-12ab0" expires: Fri, 12 May 2023 10:32:37 GMT cache-control: max-age=1 cache-control: no-store, max-age=-1 access-control-allow-origin: * access-control-allow-methods: GET accept-ranges: bytes

mcolom commented 1 year ago

As far as I researched the -1 value of max-age is not valid. Not sure if this would mean the entire directive doesn't work or just the age part.

I found this in one example somewhere, but I agree with you it's not really standard. I'll change it to 0.