• Resolved tlozano

    (@tlozano)


    Hello. I try this plugin but it can’t detect the real ip of remote client. I’m using Apache + Nginx as reverse proxy and always detect the server ip address.
    In other similar plugins I can select HTTP_X_FORWARDED_FOR as PHP metod of detect IP…
    Is it posible to use HTTP_X_FORWARDED_FOR toget the correct remote ip address?.
    Thank you

Viewing 1 replies (of 1 total)
  • Thread Starter tlozano

    (@tlozano)

    oh, sorry.
    If I add this code to WP-config works fine

    // Code for showing correct client IP address
    if ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { 
        $mte_xffaddrs = explode( ',', $_SERVER['HTTP_X_FORWARDED_FOR'] ); 
        $_SERVER['REMOTE_ADDR'] = $mte_xffaddrs[0]; 
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Bad IP registered’ is closed to new replies.