Skip to content

Instantly share code, notes, and snippets.

@lianyi
Last active August 29, 2015 14:27
Show Gist options
  • Save lianyi/09d1d1fca152fa100957 to your computer and use it in GitHub Desktop.
Save lianyi/09d1d1fca152fa100957 to your computer and use it in GitHub Desktop.
Jetty(SOLR) Configuration for IP restrictions
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<!-- =============================================================== -->
<!-- Mixin the Statistics Handler -->
<!-- =============================================================== -->
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Get id="oldhandler" name="handler"/>
<Set name="handler">
<New id="IPAccessHandler" class="org.eclipse.jetty.server.handler.IPAccessHandler">
<Set name="handler"><Ref id="oldhandler"/></Set>
<Set name="white">
<Array type="String">
<!-- local loop -->
<Item>127.0.0.1</Item>
</Array>
</Set>
<Set name="black">
<Array type="String">
</Array>
</Set>
</New>
</Set>
</Configure>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment