Serving from NFS via Nginx with ETag & Last-Modified set by Nginx
$ curl -s -v http://assets-origin.dev.gov.uk/media/599ef676759b7414919c2e7b/tmp.txt
* Trying 10.1.1.254...
* TCP_NODELAY set
* Connected to assets-origin.dev.gov.uk (10.1.1.254) port 80 (#0)
> GET /media/599ef676759b7414919c2e7b/tmp.txt HTTP/1.1
> Host: assets-origin.dev.gov.uk
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: nginx
< Date: Thu, 24 Aug 2017 17:26:17 GMT
< Content-Type: text/plain
< Content-Length: 29
< Connection: close
< Vary: Accept-Encoding
< Vary: Accept-Encoding
< Last-Modified: Thu, 24 Aug 2017 15:53:24 GMT
< Vary: Accept-Encoding
< Content-Disposition: inline; filename="tmp.txt"
< Cache-Control: private
< ETag: "599ef674-1d"
< X-Frame-Options: DENY
< Accept-Ranges: bytes
< Strict-Transport-Security: max-age=31536000
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: GET, OPTIONS
< Access-Control-Allow-Headers: origin, authorization
<
Thu 24 Aug 2017 16:53:17 BST
* Closing connection 0
Proxying to S3 via Nginx with ETag & Last-Modified set by S3
$ curl -s -v http://assets-origin.dev.gov.uk/media/599ef676759b7414919c2e7b/tmp.txt?proxy_to_s3_via_nginx=true
* Trying 10.1.1.254...
* TCP_NODELAY set
* Connected to assets-origin.dev.gov.uk (10.1.1.254) port 80 (#0)
> GET /media/599ef676759b7414919c2e7b/tmp.txt?proxy_to_s3_via_nginx=true HTTP/1.1
> Host: assets-origin.dev.gov.uk
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: nginx
< Date: Thu, 24 Aug 2017 17:27:55 GMT
< Content-Type: text/plain; charset=utf-8
< Content-Length: 29
< Connection: close
< Vary: Accept-Encoding
< Vary: Accept-Encoding
< Vary: Accept-Encoding
< Cache-Control: no-cache
< Last-Modified: Thu, 24 Aug 2017 15:53:42 GMT
< ETag: "724f4c9aaec837d8264b4ba710b16ca1"
< Cache-Control: max-age=86400, public
< Content-Disposition: inline; filename="tmp.txt"
< Accept-Ranges: bytes
< X-Frame-Options: DENY
< Strict-Transport-Security: max-age=31536000
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: GET, OPTIONS
< Access-Control-Allow-Headers: origin, authorization
<
Thu 24 Aug 2017 16:53:17 BST
* Closing connection 0
Serving from NFS via Nginx with ETag & Last-Modified set from Rails
$ curl -s -v http://assets-origin.dev.gov.uk/media/599ef676759b7414919c2e7b/tmp.txt
* Trying 10.1.1.254...
* TCP_NODELAY set
* Connected to assets-origin.dev.gov.uk (10.1.1.254) port 80 (#0)
> GET /media/599ef676759b7414919c2e7b/tmp.txt HTTP/1.1
> Host: assets-origin.dev.gov.uk
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: nginx
< Date: Thu, 24 Aug 2017 17:14:05 GMT
< Content-Type: text/plain
< Content-Length: 29
< Connection: close
< Vary: Accept-Encoding
< Vary: Accept-Encoding
< Vary: Accept-Encoding
< Content-Disposition: inline; filename="tmp.txt"
< Cache-Control: private
< ETag: "599ef674-1d"
< Last-Modified: Thu, 24 Aug 2017 15:53:24 GMT
< Accept-Ranges: bytes
< Strict-Transport-Security: max-age=31536000
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: GET, OPTIONS
< Access-Control-Allow-Headers: origin, authorization
<
Thu 24 Aug 2017 16:53:17 BST
* Closing connection 0
Proxying to S3 via Nginx with ETag & Last-Modified set from Rails
$ curl -s -v http://assets-origin.dev.gov.uk/media/599ef676759b7414919c2e7b/tmp.txt?proxy_to_s3_via_nginx=true
* Trying 10.1.1.254...
* TCP_NODELAY set
* Connected to assets-origin.dev.gov.uk (10.1.1.254) port 80 (#0)
> GET /media/599ef676759b7414919c2e7b/tmp.txt?proxy_to_s3_via_nginx=true HTTP/1.1
> Host: assets-origin.dev.gov.uk
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: nginx
< Date: Thu, 24 Aug 2017 17:13:25 GMT
< Content-Type: text/plain; charset=utf-8
< Content-Length: 29
< Connection: close
< Vary: Accept-Encoding
< Vary: Accept-Encoding
< Vary: Accept-Encoding
< Cache-Control: max-age=0, private, must-revalidate
< Last-Modified: Thu, 24 Aug 2017 15:53:24 GMT
< ETag: "599ef674-1d"
< Cache-Control: max-age=86400, public
< Content-Disposition: inline; filename="tmp.txt"
< Accept-Ranges: bytes
< Strict-Transport-Security: max-age=31536000
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: GET, OPTIONS
< Access-Control-Allow-Headers: origin, authorization
<
Thu 24 Aug 2017 16:53:17 BST
* Closing connection 0