Add Last-Modified header to all JSON files

Zack McCauley's Avatar

Zack McCauley

27 Mar, 2019 03:37 PM

I am working with a few members of a project on creating a tool that pulls the stats the JSON records (like from Curling the file shows there is no Last-Modified header which causes a couple issues with caching on the application. Would it be possible to add the Last-Modified header to the files listed above? If it's a ton of work, I understand, but it would be beneficial and should be possible via nginx and Phusion Passenger.

Header from CURL output below:
$: curl -s -v -X HEAD
* Trying
* Connected to ( port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
  CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: OU=Domain Control Validated; OU=EssentialSSL Wildcard; CN=*
* start date: Jul 11 00:00:00 2018 GMT
* expire date: Jul 11 23:59:59 2019 GMT
* subjectAltName: host "" matched cert's "*"
* issuer: C=GB; ST=Greater Manchester; L=Salford; O=COMODO CA Limited; CN=COMODO RSA Domain Validation Secure Server CA
* SSL certificate verify ok.
> HEAD /mac-benchmarks.json HTTP/1.1
> Host:
> User-Agent: curl/7.54.0
> Accept: */*
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=utf-8
< Connection: keep-alive
< Status: 200 OK
< Cache-Control: max-age=0, private, must-revalidate
< ETag: W/"fa731256ca13cf5552cfd8a063e1c113"
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< X-Runtime: 0.255081
< X-Request-Id: aca6665f-7f50-46e4-9f87-d60e49c1f319
< Date: Wed, 27 Mar 2019 15:25:04 GMT
< X-Powered-By: Phusion Passenger 5.3.5
< Server: nginx/1.14.0 + Phusion Passenger 5.3.5
* no chunk, no close, no size. Assume close to signal end

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac