views:

21

answers:

0

I'm trying to implement Nutch + Solr based search engine into my Etherpad installation. The main issue I'm having is that Nutch doesn't support POST authentication. Etherpad and Nutch are installed on the same machine, so an obvious solution would be to find a way to bypass authentication for localhost.

This is where I'm stuck. I don't know the Etherpad codebase very well, I've mostly done cosmetic tweaks until now.

Can someone point me to where I should be looking, or potential solutions ? I've found some interesting bits of code having do to with auth in the codebase, but it's Javascript, so there's no obvious way to check if the request host is localhost.

Edit :

I've found the code that handles the auth policy, and tested it with a simple condition so that it always returns true. Authentication can then be bypassed. Which leaves me with my initial problem : how can I determine if the host is localhost in Javascript ?

 if (guestPolicy == "allow") {
    return;
  }