For AI agents: the complete documentation index is available at https://mfdoctor.kevinbeier.com/1.0.0/llms.txt, the full documentation bundle is available at https://mfdoctor.kevinbeier.com/1.0.0/llms-full.txt, and this page is available as Markdown at https://mfdoctor.kevinbeier.com/1.0.0/rules/vite/server-origin.md.

vite/server-origin

  • Category: reliability
  • Default severity: info

Issue

Without server.origin, remote consumers may resolve assets against the wrong public origin in development.

How to fix it

Set Vite server.origin to the URL remotes should publish for consumers. MFDoctor recommends http://localhost:<server.port> (default port 5173); configure rules["vite/server-origin"].recommendedOrigin or turn off requireServerOrigin when your topology differs.

Suppress or retarget with rules["vite/server-origin"] set to "off" or a severity — see Suppressions and allowlists.

Sources