You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Brian Lamb <br...@journalexperts.com> on 2011/06/25 02:14:14 UTC

Reject URL requests unless from localhost for dataimport

Hi all,

My solr server is currently set up at www.mysite.com:8983/solr. I would like
to keep this for the time being but I would like to restrict users from
going to www.mysite.com:8983/solr/dataimport. In that case, I would only
want to be able to do localhost:8983/solr/dataimport. Is this possible? If
so, where should I look for a guide?

Thanks,

Brian Lamb

Re: Reject URL requests unless from localhost for dataimport

Posted by lboutros <bo...@gmail.com>.
If you are using Tomcat, perhaps you could use Valve to protect a given
context of your application I think :

<Context
    path="/solr/dataimport"
    docBase="${catalina.home}/server/solr/dataimport"
    privileged="true"
>
    <Valve className="org.apache.catalina.valves.RemoteAddrValve"
        allow="127\.0\.0\.1"
    />
</Context>

I did not test this, you have to tweak it ;)

Ludovic 

-----
Jouve
France.
--
View this message in context: http://lucene.472066.n3.nabble.com/Reject-URL-requests-unless-from-localhost-for-dataimport-tp3106804p3107384.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Reject URL requests unless from localhost for dataimport

Posted by Markus Jelsma <ma...@openindex.io>.
Firewall? It's easy to set up and the most low level. You can also use a proxy 
or perhaps manage it in your servlet container.


> Hi all,
> 
> My solr server is currently set up at www.mysite.com:8983/solr. I would
> like to keep this for the time being but I would like to restrict users
> from going to www.mysite.com:8983/solr/dataimport. In that case, I would
> only want to be able to do localhost:8983/solr/dataimport. Is this
> possible? If so, where should I look for a guide?
> 
> Thanks,
> 
> Brian Lamb