プロキシIPのリストがない場合はどうなりますか?Akamai、Google、Edgecast、CloudFrontなどのサイトアクセラレーションサービスを使用する場合。それらからセッションのIPを取得することは常に困難です。
CDNでcodeigniterアプリケーションをテストしたところ、IPがセッションデータベースのクライアントIPではなくCDNIPとして渡されていることがわかりました。
どうすればこれを回避できますか?
/*
|--------------------------------------------------------------------------
| Reverse Proxy IPs
|--------------------------------------------------------------------------
|
| If your server is behind a reverse proxy, you must whitelist the proxy IP
| addresses from which CodeIgniter should trust the HTTP_X_FORWARDED_FOR
| header in order to properly identify the visitor's IP address.
| Comma-delimited, e.g. '10.0.1.200,10.0.1.201'
|
*/
$config['proxy_ips'] = '';
ありがとう!