Why are we suddenly getting an error (possibly a red herring) regarding a CORS issue when trying to execute a function app HTTP endpoint via the Test/Run feature in Azure?
We have many function apps in our portal. Late last year (2023) we configured their access restrictions to only allow "AzureCloud" and "ApiManagement" (via the Service Tag dropdown in the rule selection).
At that time we were still able to use the Test/Run feature of a function with no issues.
Earlier this week we became aware that we can no longer use the Test/Run feature unless we add our own personal IP addresses to the list of allowed IP addresses. When we invoke a request that previously worked we are met with the below response and error message.
However, we do have https://portal.azure.com
configured in the CORS section.
I suppose we have a few questions related to this.
- Why do we need to add our client IP addresses to the whitelist for a request initiated in Azure to be accepted by Azure? I understand why we'd need to do so if we were using a third party tool like Postman, but it seems the Test/Run request should be coming from Azure and not from our local machines.
- Did something change recently (within the last week) that could have affected this feature? Everything was working last week, but since Tuesday (6/11) it hasn't worked.
- If we are going to have to whitelist individual IP addresses, is there a way to do so globally so we don't need to add multiple individual addresses to many function apps?