You would want virtual hosts configurations, I would think.
<?xml version="1.0" encoding="ISO-8859-1"?>
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="virtualHosts">
<Array type="java.lang.String">
<Item>localhost</Item>
<Item>127.0.0.1</Item>
<Item>::1</Item>
<Item>0:0:0:0:0:0:0:1</Item>
</Array>
</Set>
</Configure>
But I'm not sure it will work from WEB-INF/jetty-web.xml (might be too late in the configuration chain)
Also, I'm not sure this is 100% foolproof either.
As this is merely a "Host:" request header check, and someone could connect to your publicly addressable network interface and provide a custom "Host: localhost" header. This would be true for a connector configuration setup for host "0.0.0.0" (all network interfaces)
However, you could tie it to a specific connector on the jetty server, using <Item>@localhostonly</Item> (connector based virtual hosts).
The problem is that you would then need to setup a special connector that specifies a name of "localhostonly" for it to bind to.