As someone who runs nginx locally for web development, this is scary. One mitigation I can think of is to use this config for you Mac's local nginx:<p><pre><code> server {
listen 80 default_server;
server_name _; # some invalid name that won't match anything
return 444;
}
</code></pre>
And do the same thing for server_name localhost. For actual apps you are building, use a server_name like myapp.local rather than localhost. (edit: formatting)