Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Restrict a single webapp to localhost

You can also bind to localhost only:
should work for you(?)

On 15 April 2014 14:49, Thomas Scheffler <thomas.scheffler@xxxxxxxxxxx> wrote:
Am 11.02.2014 09:01, schrieb Thomas Scheffler:

I have a single webapp that should only be accessible by request from
localhost (ipv4/ipv6). I am looking for a way to configure it in
I provide a file (META-INF/context.xml) for Tomcat, that looks like this:

   <Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />

Yet I was not successful achieving the same with jetty 9.1. Any help is
highly appreciated.

I found this solution in the deep of the web:

    "-//Mort Bay Consulting//DTD Configure//EN"
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
  <Set name="handler">
    <New class="org.eclipse.jetty.server.handler.IPAccessHandler">
      <Call name="addWhite">
      <Set name="handler">
         <!-- here's where you put what was there before: -->
        <New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection" />

It does something but sadly even forbids access from localhost. Any ideas?

kind regards,

jetty-users mailing list

Back to the top