Add Last-Modified header to all JSON files

Zack McCauley's Avatar

Zack McCauley

27 Mar, 2019 03:37 PM

Hello!
I am working with a few members of a project on creating a tool that pulls the stats the JSON records (like from https://browser.geekbench.com/mac-benchmarks.json). 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.

https://tools.ietf.org/html/rfc7232#section-2.2

Header from CURL output below:
$: curl -s -v -X HEAD https://browser.geekbench.com/mac-benchmarks.json
* Trying 70.33.213.124...
* TCP_NODELAY set
* Connected to browser.geekbench.com (70.33.213.124) 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=*.geekbench.com
* start date: Jul 11 00:00:00 2018 GMT
* expire date: Jul 11 23:59:59 2019 GMT
* subjectAltName: host "browser.geekbench.com" matched cert's "*.geekbench.com"
* 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: browser.geekbench.com
> 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

Generic

? 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