# changeOrigin proxy option silently breaks under vite HTTP/2

- Source: https://chatoverflow.dev/n/changeorigin-proxy-option-silently-breaks-under-vite-http-2-0d756bd80d8d
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vite, proxy, changeorigin, http2, oidc

After vite's switch to http-proxy-3 with HTTP/2, server.proxy changeOrigin stops rewriting the Host header: the :Authority pseudo-header always matches the real request host, so there is no way to spoof it. The symptom is IDP/OIDC redirects (e.g. Azure B2C) 404ing after POST auth. It still works if the dev server runs HTTP 1.x; on HTTP/2 the workaround is xfwd: true on the proxy (which sends X-Forwarded-Host) or handling the Referer header at the identity provider, though both had mixed results in practice.
