alphagov / asset-manager

Manages uploaded assets (images, PDFs etc.) for applications on GOV.UK
https://docs.publishing.service.gov.uk/apps/asset-manager.html
MIT License
9 stars 9 forks source link

Update nginx config to serve organisation logos from Asset Manager #275

Closed chrisroos closed 7 years ago

chrisroos commented 7 years ago

Tasks

chrisroos commented 7 years ago

I've opened https://github.com/alphagov/govuk-puppet/pull/6721 to update the nginx config. We can't merge this change until we've uploaded all existing logos to Asset Manager.

chrisroos commented 7 years ago

We requested the UK Space Agency Whitehall organisation asset URL in integration and used Kibana to confirm that it's now being served by Asset Manager instead of Whitehall.

I'm going to request that this change is deployed to staging and production.

chrisroos commented 7 years ago

These changes have now been deployed to staging and production and I've confirmed that they're working as expected by requesting the UK Space Agency logo.

Logo being served from the cache

$ curl -I https://assets.publishing.service.gov.uk/government/uploads/system/uploads/organisation/logo/31/UKSA_logo_RGB_HomePage.jpg | sort

Accept-Ranges: bytes
Access-Control-Allow-Headers: origin, authorization
Access-Control-Allow-Methods: GET, OPTIONS
Access-Control-Allow-Origin: *
Age: 13505
Cache-Control: max-age=14400, public
Connection: keep-alive
Content-Disposition: inline; filename="UKSA_logo_RGB_HomePage.jpg"
Content-Length: 79719
Content-Type: image/jpeg
Date: Fri, 03 Nov 2017 13:22:16 GMT
ETag: "599ed2fa-13767"
HTTP/1.1 200 OK
Last-Modified: Thu, 24 Aug 2017 13:22:02 GMT
Server: nginx
Strict-Transport-Security: max-age=31536000
Via: 1.1 varnish
X-Cache-Hits: 1
X-Cache: HIT
X-Frame-Options: SAMEORIGIN
X-Served-By: cache-lhr6323-LHR
X-Timer: S1509715336.213595,VS0,VE2

Logo being served from Asset Manager

$ curl -I https://assets.publishing.service.gov.uk/government/uploads/system/uploads/organisation/logo/31/UKSA_logo_RGB_HomePage.jpg?foo | sort

Accept-Ranges: bytes
Access-Control-Allow-Headers: origin, authorization
Access-Control-Allow-Methods: GET, OPTIONS
Access-Control-Allow-Origin: *
Age: 191
Cache-Control: max-age=14400, public
Connection: keep-alive
Content-Disposition: inline; filename="UKSA_logo_RGB_HomePage.jpg"
Content-Length: 79719
Content-Type: image/jpeg
Date: Fri, 03 Nov 2017 13:23:01 GMT
ETag: "599ed2fa-13767"
GOVUK-Asset-Manager-File-Store: S3
HTTP/1.1 200 OK
Last-Modified: Thu, 24 Aug 2017 13:22:02 GMT
Server: nginx
Strict-Transport-Security: max-age=31536000
Via: 1.1 varnish
X-Cache-Hits: 1
X-Cache: HIT
X-Frame-Options: SAMEORIGIN
X-Served-By: cache-lhr6341-LHR
X-Timer: S1509715381.358165,VS0,VE2
x-amz-meta-md5-hexdigest: 3b74fcdb30201fd2779402d961da8e98
x-amz-replication-status: COMPLETED
chrisroos commented 7 years ago

I'm happy that we're now serving these organisation logos from Asset Manager so I'm closing this issue.