Re: [Cppcms-users] getting real ip of client
Brought to you by:
artyom-beilis
From: Artyom B. <art...@ya...> - 2012-05-08 12:06:27
|
There is request().remote_address() that helps you to deal with. If your run behind reverse proxy, such proxies usually define headers like X-Real-IP headers that are set to variables like HTTP_X_REAL_IP. HTTP Proxies usually handle this correctly preventing hijacking such headers. If you use internal HTTP web server take a look on http://cppcms.com/wikipp/en/page/cppcms_1x_config#http.proxy.remote_addr_headers That allow request().remote_address() behave as expected Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ ----- Original Message ----- > From: kpeo <sla...@ya...> > To: cpp...@li... > Cc: > Sent: Tuesday, May 8, 2012 1:10 PM > Subject: [Cppcms-users] getting real ip of client > > Hello, > > Is there any way to check in CppCMS application whether client connection is > local or remote (or just get real ip of client connection)? > Because any request environment like HTTP_CLIENT_IP can be faked and required > low-level aio functions to get connection IP, that inaccessible in the > application/service/request classes. > > Regards, > kpeo > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |