- Notifications
You must be signed in to change notification settings - Fork926
chore(site): setserver.allowedHosts
in storybook config to.coder
#18598
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -116,7 +116,7 @@ export default defineConfig({ | |||
secure: process.env.NODE_ENV === "production", | |||
}, | |||
}, | |||
allowedHosts: true, |
ethanndicksonJun 26, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Setting this totrue
opens developers up (as they run their dev server) toDNS rebinding attacks, as mentioned in the documentation:
/** * The hostnames that Vite is allowed to respond to. * `localhost` and subdomains under `.localhost` and all IP addresses are allowed by default. * When using HTTPS, this check is skipped. * * If a string starts with `.`, it will allow that hostname without the `.` and all subdomains under the hostname. * For example, `.example.com` will allow `example.com`, `foo.example.com`, and `foo.bar.example.com`. * * If set to `true`, the server is allowed to respond to requests for any hosts. * This is not recommended as it will be vulnerable to DNS rebinding attacks. */ allowedHosts?: string[] | true;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
If there's any other domains you'd like to add, let me know.
Uh oh!
There was an error while loading.Please reload this page.
This lets you browse storybook using a Coder Desktop hostname (i.e.
workspace.coder:6006
). The default configuration (includinglocalhost
) will still work.