Forminator and the rt-forminator integration uses Forminator_Geo::get_user_ip() to get the user's IP. The plugin recently added a strict trusted proxy check, which is causing problems for IP detection on the main site, which uses a reverse proxy (router.library).
We need to register this proxy (169.237.102.131) through a filter:
add_filter( 'forminator_trusted_proxies', function( $proxies ) {
$env_value = $_ENV['FORMINATOR_TRUSTED_PROXIES'] ?? '';
if ( empty( $env_value ) ) {
return $proxies;
}
foreach ( array_map( 'trim', explode( ',', $env_value ) ) as $entry ) {
if ( $entry !== '' ) {
$proxies[] = $entry;
}
}
return $proxies;
} );
and then set an env variable with comma-separated ips: FORMINATOR_TRUSTED_PROXIES=169.237.102.131
Forminator and the rt-forminator integration uses
Forminator_Geo::get_user_ip()to get the user's IP. The plugin recently added a strict trusted proxy check, which is causing problems for IP detection on the main site, which uses a reverse proxy (router.library).We need to register this proxy (
169.237.102.131) through a filter:and then set an env variable with comma-separated ips:
FORMINATOR_TRUSTED_PROXIES=169.237.102.131