Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rationalise Mainstream asset filename redirect & Whitehall asset replacement redirect #508

Open
floehopper opened this issue Mar 2, 2018 · 0 comments

Comments

@floehopper
Copy link
Contributor

Currently it is possible to use the API to update the file associated with an asset.

Requests for Mainstream assets which have been updated in this way will be redirected to the new file.

I think requests for Whitehall assets which have been updated in this way will just serve the new asset contents at the original URL, because the public_url_path is decoupled from the filename in the case of Whitehall assets. Having said that I don't think Whitehall is currently using this mechanism, because it uses the mechanism described below.

Separately, we've recently introduced a mechanism to allow an asset to be marked as replaced by another asset (#499). We're using this mechanism from Whitehall when an attachment is replaced by another attachment. Requests for an asset which has been replaced will result in a `301 Moved Permanently:

redirect_to asset.replacement.public_url_path, status: :moved_permanently

I think it would be worth considering rationalising this two mechanisms into a single mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant