Not adding anything to the solution unfortunately but frankly, it’s crazy how the forum is practically inundated with posts regarding X-Forwarded-For / X-Real-IP issues for at least 6-7 years, and we cannot seem to get a proper fix (or, frankly, any reasonable response) from the devs on the matter.
This is massively frustrating to me, considering that self-hosters (or generally “the people running Plex servers”) are the core user-base for Plex and integral for its popularity—and probably paying for the majority of Plex Passes. It shouldn’t be too much to ask to have PMS behave according to best practices if server admins point out when it’s not and results in a bad experience administering PMS.