Welcome Guest, Not a member yet? Register   Sign In
Codeigniter and cloudflare, problem with session?

When I active cloudflare in my site the sessions save the ip of cloudflare's server.

I add the ip in proxy ip in the config to get the correct ip sessions?

This is the list https://www.cloudflare.com/ips

Thanks for the reply.

No, CI_Session will ignore the proxy_ips setting and that's on purpose. Just don't use sess_match_ip; it is made mostly for intranet environments.

Ok, thanks Smile

This is not the right way to do.

Define trusted CF proxy IPs in virtual host configuration. No need to change in CI config
Ref link: https://support.cloudflare.com/hc/en-us/...ith-Apache

this solve my ip seesion issue and i get client original ip

Theme © iAndrew 2016 - Forum software by © MyBB