• Resolved Nono

    (@tombstones)


    Hi.

    Our site had been migrated to a server that has a proxy and the IP addresses that have been returned since then were just variations of 10.x.x.xand not the real ones. So I changed this line:

    'ip' => isset( $_SERVER['HTTP_X_REAL_IP'] ) ? esc_attr( $_SERVER['HTTP_X_REAL_IP'] ) : esc_attr( $_SERVER['REMOTE_ADDR'] ),

    to this

    'ip' => isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ? esc_attr( $_SERVER['HTTP_X_FORWARDED_FOR'] ) : esc_attr( $_SERVER['REMOTE_ADDR'] ),

    and that solved the “error.” Is there any way to include HTTP_X_FORWARDED_FOR in your plugin?

    Thank you for your awesome work.

    Nono

    https://www.ads-software.com/plugins/simple-login-log/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Right IP Behind Proxy?’ is closed to new replies.