Thank you very much!!
Zach Dennis Market Technologies Inc.
From: Aparajita Fishman <[EMAIL PROTECTED]>
Reply-To: Active4D Developer Discussion List <[EMAIL PROTECTED]>
To: Active4D Developer Discussion List <[EMAIL PROTECTED]>
Subject: Re: [Active4d-dev] remote address through proxying
Date: Mon, 7 Apr 2003 18:45:50 -0400
I was just wondering if anyone had found out a way to get the client's remote ip address when proxying with Webstar V to 4D. I know this was brought up a while ago, but it never had a resolution to it. So I thought I'd ask again.
Yes, it can be done along the lines that Michael suggested. Paste the text between the horizontal lines below into a text file, change the address 192.168.1.13:8080 to your 4D IP and port, then import it into a WebStar proxy rule.
---------------------------------------------------------------
name preprocess postprocess field1 compare1 value1 bool1 field2 compare2 value2 bool2 field3 compare3 value3 result jumpto
Active4D GET + query true false url pcre (/ 4[dD][cC][gG][iI])?([^\.]+).(a4d|a4p|inc)\?(.+) and request begin GET clientip 192.168.1.13:8080/4dcgi$1.2.$1.3?$1.4&client_ip=$3
Active4D GET true false url pcre (/4[dD][cC][gG][iI])?([^\.]+).(a4d|a4p|inc) and request begin GET clientip 192.168.1.13:8080/ 4dcgi$1.2.$1.3?client_ip=$3
Active4D POST + query true false url pcre (/ 4[dD][cC][gG][iI])?([^\.]+).(a4d|a4p|inc)\?(.+) and request begin POST clientip 192.168.1.13:8080/4dcgi$1.2.$1.3?$1.4&client_ip=$3
Active4D POST true false url pcre (/4[dD][cC][gG][iI])?([^\.]+).(a4d|a4p|inc) and request begin POST clientip 192.168.1.13:8080/ 4dcgi$1.2.$1.3?client_ip=$3
---------------------------------------------------------------
This rule will put "client_ip" into the query params of every request, which you can access within Active4D with query params{"client_ip"}. Starting with b15 you can replace 'query params' with '_query'.
Regards,
Aparajita Victory-Heart Productions [EMAIL PROTECTED] www.aparajitaworld.com
"If you dare to fail, you are bound to succeed." - Sri Chinmoy | www.srichinmoylibrary.com
_______________________________________________ Active4d-dev mailing list [EMAIL PROTECTED] http://aparajitaworld.com/mailman/listinfo/active4d-dev
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail
