i personally dont like php, but it may just be the easiest way to do what
you need assuming you have a basic web server,
send your search query to php, and use $_GET or $_POST to read it into a
variable:
https://www.php.net/manual/en/reserved.variables.get.php

then send that to the solr server in the same piece of php with curl

https://phpenthusiast.com/blog/five-php-curl-examples

and return the raw result if you want.  at the very least it hides its url,
but with this you can block the solr port to outside ip's and only allow 80
or whatever your webserver is using


On Fri, Nov 22, 2019 at 1:43 PM rhys J <rhyssha...@gmail.com> wrote:

> On Fri, Nov 22, 2019 at 1:39 PM David Hastings <
> hastings.recurs...@gmail.com>
> wrote:
>
> > 2 things (maybe 3):
> > 1.  dont have this code facing a client thats not you, otherwise anyone
> > could view the source and see where the solr server is, which means they
> > can destroy your index or anything they want.  put at the very least a
> > simple api/front end in between the javascript page for the user and the
> > solr server
> >
>
> Is there a way I can fix this?
>
>
> > 2. i dont think there is a way, you would be better off indexing an
> > indicator of sorts into your documents
> >
>
> Oh this is a good idea.
>
> Thanks!
>
> 3. the jquery in your example already has the core identified, not sure why
> > the receiving javascript wouldn't be able to read that variable unless im
> > missing something.
> >
> >
> There's another function on_data that is being called by the url, which
> does not have any indication of what the core was, only the response from
> the url.
>
> Thanks,
>
> Rhys
>

Reply via email to