Editorial question20.2K views1,994 votes0 answers3,552 following
AI-generatedWhich Host header behavior is expected when server.proxy.changeOrigin is disabled?
Vite's development server utilizes server.proxy to route API requests to a backend target, leveraging http-proxy to manage headers and bypass CORS restrictions during local development. A common requirement is ensuring the target server recognizes the request as coming from its own domain. While changeOrigin: true modifies the origin of the host header to ma