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

Switch asset hostname #1767

Merged
merged 4 commits into from
May 26, 2020
Merged

Switch asset hostname #1767

merged 4 commits into from
May 26, 2020

Conversation

kevindew
Copy link
Member

@kevindew kevindew commented May 18, 2020

Trello: https://trello.com/c/oNEtjIVp/99-serve-static-assets-from-www-hostname

This is marked as a draft until the following PR's are merged (and in puppets case, deployed):

This removes the configuration in this app that specifies that this app should use the assets.publishing.service.gov.uk hostname for serving assets with the expectation that these assets will instead be served off the www hostname. This is to implement RFC 115. Because of this the path to assets will be changed to be prefixed with /assets so all GOV.UK assets are hosted in the same path.

The asset host can still be configured in this app by a ASSET_HOST environment variable, this will be used in govuk-docker and publishing-e2e-tests to avoid needing additional nginx configuration.

@bevanloon bevanloon temporarily deployed to government-f-no-asset-h-eyx1xe May 18, 2020 10:50 Inactive
@kevindew kevindew marked this pull request as draft May 18, 2020 10:51
@kevindew kevindew changed the title Remove explicit asset host Switch asset hostname May 22, 2020
@bevanloon bevanloon temporarily deployed to government-f-no-asset-h-eyx1xe May 22, 2020 15:02 Inactive
@kevindew kevindew marked this pull request as ready for review May 26, 2020 14:21
kevindew added 4 commits May 26, 2020 15:21
This is in preparation for these assets to be on www.gov.uk
This removes this global environment variable on the expectation that
assets will be served from www.gov.uk and thus won't need configuring.

A new environment variable ASSET_HOST is created so that a host can
still be specified. This is useful for when you are serving
government-frontend behind router but haven't set up asset proxying.
This is the case in the govuk-docker development environment for
example.

This also removes unnecessary slimmer configuration as that is the
default option.
This isn't necessary if assets aren't served on a particular host.
This shouldn't be needed if assets are served at a relative path.
@bevanloon bevanloon temporarily deployed to government-f-no-asset-h-eyx1xe May 26, 2020 14:22 Inactive
@kevindew kevindew merged commit af1e29b into master May 26, 2020
@kevindew kevindew deleted the no-asset-host branch May 26, 2020 14:45
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

Successfully merging this pull request may close these issues.

3 participants