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

Rewrite Whitehall asset URLs in Content Store content #322

Open chrisroos opened 6 years ago

chrisroos commented 6 years ago

Whitehall's non-attachment assets can be accessed via both www.gov.uk/government/uploads/... and assets.publishing.service.gov.uk/government/uploads/.... We're in the process of changing this so that they're only accessible via assets.publishing.service.gov.uk.

Some asset URLs using www.gov.uk are written into content in the Content Store. We'll want to rewrite these so that they use assets.publishing.service.gov.uk instead.

For example, this Heathrow expansion consultation content contains a link to a consultation response form asset at https://www.gov.uk/government/uploads/system/uploads/consultation_response_form_data/file/622/revised-draft-airports-nps-response-form.docx (under the details > ways_to_respond > attachment_url key). We'll want to update these so that they're using assets.publishing.service.gov.uk instead.

chrisroos commented 6 years ago

We updated Whitehall to write assets.publishing.service.gov.uk (instead of www.gov.uk) to the Content Store in https://github.com/alphagov/whitehall/pull/3634.

We added a redirect from www.gov.uk to assets.publishing.service.gov.uk in https://github.com/alphagov/whitehall/pull/3627.

I'm not yet sure what to do about the more general issue of Content Store content that contains links to assets using www.gov.uk.