RTC Forums
November 24, 2024, 04:10:23 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Login
Register
RTC Forums
>
Subscription
>
Support
>
How to best block selective IP access (TRtcHttpServer)?
Pages: [
1
]
« previous
next »
Print
Author
Topic: How to best block selective IP access (TRtcHttpServer)? (Read 4171 times)
craigism
RTC Expired
Posts: 5
How to best block selective IP access (TRtcHttpServer)?
«
on:
October 12, 2015, 11:48:32 PM »
I have a TRtcHttpServer with a number of TRtcDataProviders. I can block access with a 403 message in each of the TRtcDataProviders. Is there a easy way to do it in the TRtcHttpServer's events to make coding easier? I would like to return a 403 message and then disconnect the client.
Any ideas?
Thanks.
Craig.
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: How to best block selective IP access (TRtcHttpServer)?
«
Reply #1 on:
October 13, 2015, 08:30:10 AM »
TRtcDataProvider
,
TRtcServerModule
,
TRtcDataServerLink
and
TRtcDualDataServerLink
components have a
CheckOrder
property, which defines the order of executing
OnCheckRequest
events across all components connected to the same Server or ServerLink component. Once a component executing the "OnCheckRequest" event calls the "Sender
.Accept
" method, no other components will receive any events related to that request and the component will be responsible for process it. Using this mechanism, you can attach a new "TRtcDataProvider" component with a
low
"CheckOrder" value (negative values are allowed) to your Server component to filter requests and close connections from unwanted IP addresses.
PS. Events on the Server component (TRtcHttpServer, TRtcISAPIServer and TRtcMessageServer) will be called
last
, allowing you to handle requests which have NOT been accepted by any other connected component. As an alternative, you can use a TRtcDataProvider component with a
high
"CheckOrder" value to handle requests which weren't "accepted" by any other component.
Best Regards,
Danijel Tkalcec
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Dashboard
-----------------------------
=> General
=> 3rd-Party
=> Quick Start
-----------------------------
Subscription
-----------------------------
=> Support
Loading...