Why does apm-server not display frontend information on kibana if apm javascript agent accesses requests from ingress

I found that using nginx 'proxy_pass' can also produce tansactions.
upstream apm {
server 192.168.10.250:8200;
}

server {
server_name apmserver.xxx.com;
location / {
proxy_pass http://apm;
}
}

I still don't know what happened.