I wrote this article some years ago here “HTTPS only on Azure App Service Web Apps” that explains how to redirect all traffic made to an Azure App Service using HTTP to HTTPS using a URL Rewrite rule. This is now achievable in the portal.
To enable the HTTPS Only feature in the portal, navigate to the App Service where you want to enforce this and select the Custom domains link which opens a blade similar to that shown in Figure 1.
Figure 1, how to force HTTPS Azure App Service
When I made the change I did not see any modification in my web.config so this change must be happening on the front ends where the SSL/TLS and domain configurations are handled. This is good because the work happens there instead of on the workers.
Note that this feature is available in Shared mode and higher. When I checked the same on a FREE site, the option was not there, as seen in Figure 2.
Figure 2, how to force HTTPS Azure App Service