Hi Andrew - thanks for the report. This issue specifically affects reverse-proxy configurations where multiple X-Forwarded-Proto headers are added to the request before it hits the application container.
I’ve just merged a fix into main - it should hit tests-passed in about 20 minutes
https://github.com/discourse/discourse/commit/584a6e35528800dffa23c2fb5525000dde8fa931
Once it appears in tests-passed you’ll need to do a full rebuild (nginx config changes are not applied during UI-based upgrades).