-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Storybook on Chrome fails to load due to HSTS forwarded by Vite proxy from Teleport cluster (ERR_SSL_PROTOCOL_ERROR
)
#32256
Comments
I'm not sure if I understand the issue correctly as it never stopped working for me, it always opens |
Do you still have this problem with regards to the port? What error do you get? I recently created another issue for tracking the msw problems specifically. #34450 |
yes, it used to work outside of the box, and one day it just stopped working: i wasn't the only one affected. i tried looking into it once, but couldn't figure it out. i also can't run storybook with localhost on cloud either |
wait a minute... do you use firefox to dev? i just tried it out on firefox and localhost:9002 works, but chrome doesn't (i've always devved in chrome) works on firefox/edge, but not chrome/brave |
ERR_SSL_PROTOCOL_ERROR
)
I think I've figured it out, I updated the issue description. I don't have time at the moment to pick the right solution and implement it unfortunately. |
I think we can close this now that storybook uses https, right? |
Addressed in #44041. |
When running
yarn storybook
, it will auto open browser withhttp://localhost:9000
, at some point with all our upgrades, it stopped working.Workaround was to use the generated
network address
or use127.0.0.1:9000
:This happens because when people work on the Web UI through
yarn start-teleport
, the Vite proxy is served overlocalhost:3000
. The Teleport cluster sends theStrict-Transport-Security
header which tells Chrome to use HTTPS for the whole localhost domain.By going to
chrome://net-internals/#hsts
, then typinglocalhost
under "Delete domain security policies" and clicking Delete, you can remove this policy from localhost and Storybook will work over http, but once you open a Teleport cluster on localhost, Chrome will require https for localhost again.We can just one of two solutions:
mkcert
, say backend devs who occasionally do something with Teleport or the design team.Strict-Transport-Security: max-age=0
.configure
field to each proxy target and then callingproxy.on('proxyReq', function(proxyReq, req, res, options) { … })
and setting the header onres
. Kind of like in the example with rewriting request headers, but instead we have to rewrite response headers. I'm not 100% sure if this will work.Strict-Transport-Security
.chrome://net-internals/#hsts
anyway.The text was updated successfully, but these errors were encountered: