Front door invoke function app for every request

Conrad 40 Reputation points
2024-02-20T14:27:15.9166667+00:00

I have an azure front door configuration that I would like to handle requests for any path and execute a function that will either return a redirect to another path or will allow the request to continue to another origin. I am seeing a few problems, the function is only being called for the root path demo-abc.azurefd.net/ . Even though the route is configured to match /*. When I request something like demo-abc.azurefd.net/test, the function is not called and a 404 not found is returned. The second issue I am finding is that in the function, the request path is for /api/demo when I really need to know what the original requested path was, not the path of the function. Happy to provide any configuration details required!

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,323 questions
Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
586 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pramod Valavala 20,591 Reputation points Microsoft Employee
    2024-02-22T14:06:46.12+00:00

    @Conrad Since the request path expected by the function app is different, you will require a URL Rewrite Rule set up on Azure Front Door to forward the requests correctly.

    So, a request coming to demo-abc.azurefd.net/test would be forwarded to demo-abc.azurewebsites.net/api/test.


0 additional answers

Sort by: Most helpful