How do I disable IPv4-mapped IPv6?

This is controlled by the net.ipv6.bindv6only sysctl. Add the following to /etc/sysctl.conf and run sudo sysctl -p to effect the change.

net.ipv6.bindv6only=1

Applications can also explicitly only bind to the IPv6 address instead of changing this globally, for example, nginx has the ipv6only option to the listen directive. This corresponds to the IPV6_V6ONLY option to setsockopt().