From: Daniel Berger Date: 2002-10-24T03:06:03+09:00 Subject: Re: XMLRPC and IP authentication Michael Neumann wrote: > On Wed, 2002-10-23 at 18:15, Daniel Berger wrote: > > Michael Neumann wrote: > > > > > > > > > > > I've added a ip_auth_handler method in class Server, which is called > > > from method serve (in httpserver.rb) before request_handler is called. > > > This method should return true if the client is allowed to connect, > > > otherwise false. > > > This way, you can simply override Server#ip_auth_handler to perform > > > IP-based restrictions. > > > > > > What's the right status code when IP auth disallows access? > > > 405 - Method not allowed? > > > > > > Regards, > > > > > > Michael > > > > Sounds interesting, but how does it work? > > > > All I really want to do is something like this: > > > > valid_ip = ["1.2.3.4","22.33.44.55"] > > server.set_service_hook{ |obj,*args| > > raise SomeException unless valid_ip.include?(server.peer_addr) > > obj.call(*args) > > } > > In xmlrpc4r version 1.7.12, the following should work: > > Is there a way to use this without having to define my own subclass? If so, can you please provide an example? On another note, I noticed the update to the RAA. It appears, however, that the download link still points to 1.7.11. Just thought I'd mention it. Regards, Dan