Today, I ran a Nuxt web project locally. Everything started up normally, but when I opened the page, it only displayed `Upgrade Required`, and the console was full of `426` errors. My first reaction was that the port or `nuxt-auth` was misconfigured. I tried changing `1999, 3666, 9999, 3003` in a loop, but it didn't work.
I aligned the auth and port settings with other projects, but it still didn't work. Finally, I tested it with PowerShell:
- `http://127.0.0.1:1999/ → 200`
- `http://localhost:1999/ → 426`
It turned out the problem was neither in the business code nor the port number.
Reason: On Windows, `localhost` prioritizes IPv6's `::1` over `127.0.0.1`. This is an old behavior after IPv6 was enabled, not a new Win11 issue, but I don't know why this problem never occurred before!?
The `Nuxt/Vite` development server includes HMR WebSocket. Regular HTTP requests coming from `::1` are sometimes treated as requiring a "protocol upgrade", thus returning `426`. Using `127.0.0.1` (IPv4) works normally.
## Solution
For development, use **http://127.0.0.1:1999**, not `localhost`.
> PS: This new project was created and written by AI. It's possible there's a subtle configuration error somewhere that I'm not aware of, so I'll just temporarily use `127.0.0.1` for now~