x-functions-key missing when calling Azure Function from Azure SWA

Mark Dabrowski 0 Reputation points
2024-08-30T14:38:55.6766667+00:00

I have my Azure Functions set to authLevel = 'function'. I'm able to properly pass the x-functions-key in the header when using Postman and get a response from my Azure Function.

However, in my Azure SWA when using fetch and specifying the x-functions-key, it seems to be removed / modified when it reaches the Azure Function.

I have tried adding other customer headers (e.x. x-test-header) and is being properly passed to the Azure function from the SWA.

I noticed in the header received by the Azure Function that there's a x-ms-auth-token. Is x-functions-key being converted to x-ms-auth-token because of the SWA and Azure Function being linked?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,890 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
902 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.