StefanSchranz-3721, Apologies for the delayed response from over the weekend. Thanks for posting this great question.
Just to highlight, App Service has a list of Trusted Root Certificates which you cannot modify in the multi-tenant variant version of App Service, but you can load your own CA certificate in the Trusted Root Store in an App Service Environment (ASE), which is a single-tenant environment in App Service. (The Free, Basic, Standard, and Premium App Service Plans are all multi-tenant, and the Isolated Plans are single tenant.)
As you indicated, yes when an app hosted on Azure App Service, tries to connect to a remote endpoint over SSL, it is important that the certificate on remote endpoint service is issued by a Trusted Root CA. If the certificate on the remote service is a self-signed certificate or a private CA certificate, then it will not be trusted by the instance hosting your app and the SSL handshake will fail with the error.
So, in this case, there are two solutions:
1.Use a certificate that is issued by one of the Trusted Root Certificate Authorities in App Service on the remote server.
2.If the remote service endpoint certificate could not be changed or there is a need to use a private CA certificate, host your app on an App Service Environment (ASE) and load your own CA certificate in the Trusted Root Store
Checkout this doc for more details on this - Root CA on App Service
--We have feedback on this - Support for private intermediate CA – you may wish to upvote.
Yes, I understand about the cost factor for App Gateway, just to highlight, the App Gateway is a regional service capable of hosting up to 100 endpoints. It would be one App Gateway per region per 100 sites behind the reverse proxy.
The production-recommended solution is to configure Application Gateway and App Service to not override the hostname. Kindly see this doc - Preserve the original HTTP host name between a reverse proxy and its back-end web application
--Please be assured that I have relayed your feedback internally to our product engineering team. Thanks for your valuable feedback.