Name the HTTP Server Connector.  .setName("foo")

Wrap the IPAccessHandler in a ContextHandler.
Set the virtual hosts on that ContextHandler to have an entry "@foo"

That way the ContextHandler (and the nested/wrapped IPAccessHandler) will
only run for the HTTP Server Connector.

Joakim Erdfelt / [email protected]


On Tue, Apr 16, 2019 at 1:22 PM Nicholas DiPiazza <
[email protected]> wrote:

> Dear Jetty folks:
>
> Let's say I am enabling the ipaccess module on jetty:
>
> *jetty-ipaccess.xml*
>
> <?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" 
> "http://www.eclipse.org/jetty/configure_9_3.dtd";>
> <!-- =============================================================== --><!-- 
> The IP Access Handler --><!-- 
> =============================================================== -->
> <Configure id="Server" class="org.eclipse.jetty.server.Server"><Call 
> name="insertHandler"><Arg><New id="IPAccessHandler" 
> class="org.eclipse.jetty.server.handler.IPAccessHandler">
>     <Set name="white">
>      <Array type="String">
>      <Item>127.0.0.1</Item>
>      <Item>192.168.1.168</Item>
>      </Array>
>     </Set>
>     <Set name="whiteListByPath">false</Set></New></Arg></Call></Configure>
>
> Then I enable it with jetty/home/start.jar --add-to-start=ipaccess
>
> But I want this filter to *only* apply to the http connector. I do not
> want it to apply to my https connector.
>
> How do I configure it so that it only affects the http module, not the
> https module?
> I have created a stackoverflow of my question here as well and assigned a
> bounty of 50 points to it.
>
> https://stackoverflow.com/questions/55622306/jetty-ipaccess-per-connector
> _______________________________________________
> jetty-users mailing list
> [email protected]
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://www.eclipse.org/mailman/listinfo/jetty-users
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users

Reply via email to