Hello takeolexus
You're attempting to copy the X-Forwarded-For header to a different header variable in Azure Front Door (AFD) so your backend ASP.NET Core application can access it correctly without any issues.You should make sure that you're using the Rules Engine properly to modify the header as needed. According to the documentation on header actions in AFD, you can set up a rule to change the request headers.
Here we need to add ruleset for the route that is matching incoming request custom domain and path users are accessing. You can set the new header to the value of X-Forwarded-For by using the header modification action type:
- For example, assign the header value as {http_req_header_X-Forwarded-For}.
Please ensure that the changes are deployed and properly linked to the route you are working on.
If you’ve already configured this and it isn’t working, try the following checks:
- Make sure the rule is enabled and properly linked to the AFD route.
- Verify that no other rules or settings are conflicting and affecting header processing.
Please check the below reference document:
https://learn.microsoft.com/en-us/azure/frontdoor/front-door-http-headers-protocol
Hope the above answer helps! Please let us know do you have any further queries.
Please do not forget to “up-vote” wherever the information provided helps you, this can be beneficial to other community members.