Nice work!
Can you please elaborate why you have used Azure Functions here, are there any benefits over Azure Static Web App?
There are two Azure resources that can be used to host the MTA-STS policy: Azure Static Web App and Azure Functions. Although this article describes how to deploy the policy using both the resources, the recommended method is Azure Static Web App as it’s designed for hosting static pages such as the STS policy, and Azure simplifies the configuration by providing a TLS certificate for the MTA-STS webpage out of the box, without requiring more configuration.
Source: https://learn.microsoft.com/en-us/purview/enhancing-mail-flow-with-mta-sts
Found the reason:
One major difference is, that Azure Static Web Apps allow you to add 5 custom domains per app, while Azure Functions allow you to add 500 custom domains per app. So if you want to deploy MTA-STS for more than 5 domains, you must deploy a Azure Function App or alternatively multiple Azure Static Web Apps.
Source: https://github.com/jklotzsche-msft/PS.MTA-STS/tree/main