-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
HTTP2 Pseudo headers get rejected by Remix [\w Vite] #7867
Comments
Hi, I'm having this same issue on running
It seems like the issue comes from |
Thanks for raising the issue and providing contexts. I think the issue goes like:
Two solution/workaround I came up with are: 1. remove node polyfill hi-ogawa/remix-reproduction-7867#1 or 2: filter out pseudo headers hi-ogawa/remix-reproduction-7867#2. Interesting to note that, node's builtin //// node repl
$ node
Welcome to Node.js v18.16.0.
Type ".help" for more information.
> new Headers({ ":method": "GET" })
HeadersList {
cookies: null,
[Symbol(headers map)]: Map(1) { ':method' => { name: ':method', value: 'GET' } },
[Symbol(headers map sorted)]: null
}
//// browser devtools
> new Headers({ ":method": "GET" })
VM109:1 Uncaught TypeError: Failed to construct 'Headers': Invalid name
at <anonymous>:1:1 There are other issues due to remix injecting |
A workaround for this issue is enabling server: {
proxy: {
// ...
},
}, |
Fixed by #8062 and remix-run/web-std-io#55 |
I ran into a similar issue when I switched to Remix Vite with the Cloudflare dev proxy and had to use the |
What version of Remix are you using?
2.2.0
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
{ server: { https: true } }
vite-plugin-mkcert
Expected Behavior
Site works
Actual Behavior
Site throws the following error:
HTTPS in Vite will include HTTP2 by default, but also setting the
server.proxy
option (e.g. to{}
), will fallback to just TLS. Everything works fine then.The text was updated successfully, but these errors were encountered: