I'm working on an Azure Static Web App and encountering some difficulty with calling Azure Functions from sources other than the Static Web App's Website.
For example, if I have a function /api/FunctionA
and another function /api/FunctionB
, I'd like to be able to call FunctionB
from FunctionA
via an HTTP request.
I'm able to do this locally, but trying to do it in production triggers a 401 Unauthorized response. I'm assuming this has something to do with CORS, but I'm not sure if it's possible to configure CORS manually within Static Web Apps. Is there any "official" or recommended way of calling one function from another via HTTP requests? I know about function chaining with Durable Functions, but Durable Functions are not supported in Static Web Apps. And even if they were, it would be overkill for what I'm trying to accomplish. Would appreciate any advice, thank you!