Azure Static Web / Azure Functions - missing Authentication Header

98 Views Asked by At

We host an SPA (angular) with Auth0 on an Azure Static Webapp and use Azure Functions (nodejs) as backend. The functions are also displayed correctly under API.

enter image description here

If I want to call the functions from the frontend via https://mycool.azurestaticapps.net/api, the request works, but the authentication information (header) from the backend is empty and is not sent correctly. What am I doing wrong?

If I call the Azure Functions directly (https://mycool.azurewebsites.net/api), it works, the header information is completely available.

How do I have to configure the "staticwebapp.config.json" so that it works? here my current config:

{
  "routes": [
    {
      "route": "/api*",
      "allowedRoles": ["authenticated"]
    }
  ]
}
0

There are 0 best solutions below