We have created an endpoint on Azure Front Door to access .azurewebsites.net through private link, and in my app service's web config I have created below rewrite rule to set HTTP_HOST value same as HTTP_X-Forwarded-Host. After adding this rule my Front door URL stops working. However as soon I remove this rule, front door url starts working. Issue is with Private link only. As soon as I route from public network, rewrite rule works as expected. Can you please suggest?
<rule name="Set value of HTTP_HOST to value of HTTP_X-Forwarded-Host header">
<match url="(.*)"></match>
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_X-Forwarded-Host}" pattern="^$" negate="true" />
</conditions>
<serverVariables>
<set name="HTTP_HOST" value="{HTTP_X-Forwarded-Host}"></set>
</serverVariables>
</rule>