WordPress.org

Ready to get started?Download WordPress

Forums

Simple Login Log
Right IP Behind Proxy? (2 posts)

  1. Nono
    Member
    Posted 1 year ago #

    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

    http://wordpress.org/plugins/simple-login-log/

  2. Max Chirkov
    Member
    Plugin Author

    Posted 7 months ago #

    Thanks Nono. I will include that into the next update.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic