You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Isle-buildkit Tag 2.0.0, regardless of the client IP used to access the Drupal site, Matomo is recording a 172.22.0.0 IP address as opposed to the client IP. Are others experiencing this?
Diagnostics:
$_SERVER['HTTP_X_FORWARDED_FOR'] is correct within the Matomo container. Verified by checking Matomo->Administration->Diagnotics->phpinfo -- $_SERVER['HTTP_X_FORWARDED_FOR'] = my_routable_public_ip_address. Traefik appears to be properly forwarding the client IP in the header.
add_setting General proxy_client_headers "${MATOMO_PROXY_CLIENT_HEADERS}"
To (untested) a version with [] as part of the key
add_setting General "proxy_client_headers[]" "${MATOMO_PROXY_CLIENT_HEADERS}"
I think the reason the array works but not the single value assignment of proxy_client_headers is the the Matomo code is clobbering the value here (though I might be misunderstanding the usage of the @ in this context):
When using Isle-buildkit Tag 2.0.0, regardless of the client IP used to access the Drupal site, Matomo is recording a 172.22.0.0 IP address as opposed to the client IP. Are others experiencing this?
Diagnostics:
$_SERVER['HTTP_X_FORWARDED_FOR'] is correct within the Matomo container. Verified by checking Matomo->Administration->Diagnotics->phpinfo -- $_SERVER['HTTP_X_FORWARDED_FOR'] = my_routable_public_ip_address. Traefik appears to be properly forwarding the client IP in the header.
Checking to see if Matomo is setup correctly:
The above looks correct as per:
Trying an experiment, let's set an array instead of a single value for
proxy_client_headers
:"proxy_client_headers[]"
(note the[]
)Matomo is now recording the correct client IP (i.e., 172.22.0.0 private IP representing Docker)
A fix might be changing
isle-buildkit/matomo/rootfs/etc/s6-overlay/scripts/install.sh
Line 56 in 2173ab5
To (untested) a version with
[]
as part of the keyI think the reason the array works but not the single value assignment of
proxy_client_headers
is the the Matomo code is clobbering the value here (though I might be misunderstanding the usage of the@
in this context):https://github.com/matomo-org/matomo/blob/5505608c6504f80e5f4bcbc609370180489d420c/core/IP.php#L48-L52
The text was updated successfully, but these errors were encountered: