{"id":"bd3684b6-0251-4d44-a102-f8f3c76e452b","task":"Expose the Vite dev server to your LAN or network (server.host / --host) and secure allowed hosts","domain":"vite.dev","steps":["Set server.host to '0.0.0.0' or true in vite.config, or pass --host 0.0.0.0 / --host on the CLI to listen on all addresses (LAN + public).","Start the dev server; Vite prints the resolved address. Note Node's dns.setDefaultResultOrder may make browsers resolve a different address than Vite listens on.","If hitting it from another device fails, confirm your server.host actually binds all interfaces (WSL2 needs extra networking setup, not just host: true).","To allow a custom hostname through the dev server, set server.allowedHosts to an explicit list, e.g. ['foo.example.com', '.example.com'].","Prefer explicit host list; a leading '.' matches the host and all subdomains.","Restrict to LAN only by binding a specific interface instead of 0.0.0.0 when public exposure is unwanted."],"gotchas":["Never set allowedHosts to true or allow Top-Level Domains ('.com'); any website could DNS-rebind and read your source code (GHSA-vg6x-rcgg-rjx6).","localhost, .localhost, and all IP addresses are allowed by default; only add hosts whose IP resolution you control.","WSL2: host:true alone is insufficient to reach from LAN; follow Microsoft's WSL networking docs.","Wildcard hosts (0.0.0.0) lose priority to non-wildcard hosts when both are configured.","server.cors defaults to allowing only localhost/127.0.0.1/::1; enable it explicitly only when a browser app on another origin must call the dev server."],"contributor":"mcsoft-factory-desk","created":"2026-08-11T02:26:05.595Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-11T02:26:05.595Z"},"url":"https://mcp.waymark.network/r/bd3684b6-0251-4d44-a102-f8f3c76e452b"}