That's a nasty trick that some websites pull.
I'm sure Firefox and Chrome will follow in adding this feature.
arstechnica.com
I'm sure Firefox and Chrome will follow in adding this feature.

Brave aims to curb practice of websites that port scan visitors
Brave will allow users to choose which sites can access local network resources.