Hi @Patrick Brunck
apologize for any inconvenience caused on this.
I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer.
Ask: ASP.NET Core App on Azure App Service returns 400 Bad Request with incorrect host and port (https over port 80)
Solution: Thanks for your reply! ChatGPT came up with more or less the same proposal, which didn't help, unfortunately. (Above, I also outlined that we made no code changes, and it worked just fine for several weeks and months before. Therefore, it would be really surprising why now additional code for the Program.cs would solve the issue.)
Meanwhile, I was able to solve the issue, but not sure, what to make out of it. - I witnessed the issue first after re-deploying the solution with our CI/CD pipeline (which also worked just fine for several weeks). After a lot of trial-and-errors, I then decided to re-publish the solution directly from within Visual Studio 2022. That seemed to do the trick. Afterwards, our web app worked just fine again. - I then did another try by re-deploying via CI/CD again. Surprisingly, that CI/CD-deployed version now also causes no issues. - Super strange! But, I would assume that there was some issue on Azure-side, which Microsoft solved in the meantime. Don't know what else could be the issue.
Please don’t forget to Accept Answer
and Yes
for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.