Skip to content

Set 'storybook.thegulocal.com' as an allowed host in storybook#15733

Merged
abeddow91 merged 2 commits into
mainfrom
ab/storybook-allowed-hosts
Apr 22, 2026
Merged

Set 'storybook.thegulocal.com' as an allowed host in storybook#15733
abeddow91 merged 2 commits into
mainfrom
ab/storybook-allowed-hosts

Conversation

@abeddow91
Copy link
Copy Markdown
Contributor

What does this change?

Adds storybook.thegulocal.com as an allowed host in storybook core.allowedHosts config.

It also extends the list of make commands to include storybook-proxy. Running this will open storybook on the storybook.thegulocal.com domain by default, reducing some friction whilst devloping of having to remember the domain. This has been added as a separate command rather than extending the current storybook command so that users are not forced to use nginx mappings.

Why?

Storybook's dev server validates the Host header on incoming requests and rejects any host not explicitly allowed, returning a 403. When accessing Storybook via the local reverse proxy at storybook.thegulocal.com (rather than localhost:4002 directly), requests were being rejected with an invalid host error.

Adding the proxy domain to allowedHosts allows Storybook to be accessed through the nginx reverse proxy, which is necessary for developing components, such as videos with subtitles, that require a specific origin to satisfy cross-origin policies.

Screenshots

Before After
before after

@abeddow91 abeddow91 requested a review from a team as a code owner April 21, 2026 14:40
@github-actions
Copy link
Copy Markdown

Hello 👋! When you're ready to run Chromatic, please apply the run_chromatic label to this PR.

You will need to reapply the label each time you want to run Chromatic.

Click here to see the Chromatic project.

@abeddow91 abeddow91 self-assigned this Apr 21, 2026
@abeddow91 abeddow91 added feature Departmental tracking: work on a new feature run_chromatic Runs chromatic when label is applied labels Apr 21, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Apr 21, 2026
@abeddow91 abeddow91 merged commit 143ea31 into main Apr 22, 2026
32 of 33 checks passed
@abeddow91 abeddow91 deleted the ab/storybook-allowed-hosts branch April 22, 2026 07:34
@gu-prout
Copy link
Copy Markdown

gu-prout Bot commented Apr 22, 2026

Seen on PROD (merged by @abeddow91 8 minutes and 30 seconds ago) Please check your changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Departmental tracking: work on a new feature fronts + curation Seen-on-PROD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants