Welcome Guest, Not a member yet? Register   Sign In
Session and match_ip ignore proxy
#9

(03-14-2017, 12:14 PM)gdhnz Wrote: Our web setup uses docker containers behind some proxies.  What I see when I use match_ip for sessions is the ip address of the proxies.

All I've done is copy the system/libraries/Sessions/drivers/Session_redis_driver.php file to application/libraries/Sessions/drivers/MY_Session_redis_driver.php and just overrode the methods that used $_SERVER['REMOTE_ADDR'].

According to the documentation, this how you override core files.

If you're overriding the entire driver functionality (and not just the IP filtering), that means you won't get any bugfixes for that driver.
Still, you're explaining what you did, not why.

And even that is besides the point ... To clarify, I see two potential problems:

1. sess_match_ip is not for everybody; chances are you're using it just because it exists and not because you need it.
2. You're relying on (and changing) the framework, instead of properly configuring your environment. Unless you're running Apache with mod_php, it's the httpd that tells PHP what the REMOTE_ADDR value should be - this is where it should be configured; not in your code.
Reply


Messages In This Thread
Session and match_ip ignore proxy - by gdhnz - 03-13-2017, 01:39 PM
RE: Session and match_ip ignore proxy - by gdhnz - 03-13-2017, 02:59 PM
RE: Session and match_ip ignore proxy - by Narf - 03-13-2017, 03:23 PM
RE: Session and match_ip ignore proxy - by gdhnz - 03-13-2017, 03:29 PM
RE: Session and match_ip ignore proxy - by Narf - 03-14-2017, 03:00 AM
RE: Session and match_ip ignore proxy - by gdhnz - 03-13-2017, 04:18 PM
RE: Session and match_ip ignore proxy - by gdhnz - 03-14-2017, 12:14 PM
RE: Session and match_ip ignore proxy - by Narf - 03-15-2017, 03:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB