access avoidance

Please post support and help requests here.
Hellbard
Posts: 12
Joined: 16 Mar 2007, 11:21

access avoidance

Postby Hellbard » 13 Apr 2007, 12:35

Hi , I am working on HTTP server and I need some access avoidance. I need to block some IP to access my server. Is here any chance to do it with this library?

guenter
Posts: 1194
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: access avoidance

Postby guenter » 13 Apr 2007, 13:40

You can check the client's IP address in your HTTPRequestHandlerFactory. The IP address of the client can be obtained by using the clientAddress() member function of HTTPServerRequest. You can then check the client address agains a list of addresses, or against a certain subnet. If the client address is valid, return a new request handler. Otherwise return 0.

Hellbard
Posts: 12
Joined: 16 Mar 2007, 11:21

Re: Re: access avoidance

Postby Hellbard » 15 Apr 2007, 21:30

> You can check the client's IP address in your HTTPRequestHandlerFactory. The IP address of the client can be obtained by using the clientAddress() member function of HTTPServerRequest. You can then check the client address agains a list of addresses, or against a certain subnet. If the client address is valid, return a new request handler. Otherwise return 0.
>

Thanks for your reply.


Return to “Support”

Who is online

Users browsing this forum: No registered users and 1 guest

cron