On a fresh Jira-8.4.1 installation hosted on an Amazon Linux 2 EC2 instance with an SSL-enabled reverse proxy built using nginx-1.12 (AWS provided), we are observing some strange behavior with gadgets.
When we try to add a new gadget, we noticed that all of the URLs have "localhost" instead of our hostname:

We also saw this health check error:

The base URL is correct.
We added arguments for -Dhttp.nonProxyHosts and -Dhttps.nonProxyHosts as directed in option #3 of https://confluence.atlassian.com/jirakb/jira-server-base-url-health-check-fails-859447384.html, using the hostname in our base URL, but we are not seeing any change in behavior.
Avatars are also not available:

*Everything* else on this site is working as expected through the HTTPS proxy, so we are looking for suggestions on other things we can try.
Thanks,
Rodney