DNS rebinding can be fixed at the DNS server level. OpenWRT has an option for it.
But this websocket thing in browsers can't easily be turned off/mitigated AFAICT.
Let me know how that works with DNS over HTTP
You can't always depend on that. eg. when you're on public/enterprise wifi that intercepts DNS requests.