Whitelisting CORS of Azure Function app instead outbound IP addresses

Alicja Rudnicka 30 Reputation points
2023-01-11T15:38:28.5233333+00:00

Hello,

I need to whitelist outbound IP address of Azure Function App with the third party firewall. As far as I learned from your documentation, if we would like outbound IP not to change, there needs to be used NAT gateway with Premium plan, or App service plan. Is there any reason why documentation doesn't mention option of whitelisting Azure Function CORS instead of outbound IPs? I believe this should work normally using Consumption plan?

Thanks

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,930 questions
0 comments No comments
{count} votes

Accepted answer
  1. MughundhanRaveendran-MSFT 12,506 Reputation points
    2023-01-16T06:44:19.9866667+00:00

    Hi @AR,

    Thanks for reaching out to Q&A.

    CORS and IP whitelisting are both different concepts. It all depends on the 3rd party website.

    If a specific resource in the website or the website itself blocks cross-origin requests, then you will have to add the function app url ("appname.azurewebsites.net") to the 3rd party CORS list so that the function can access the 3rd party website. This would work even with Consumption SKU.

    On the other hand, if the 3rd party website has IP restriction enabled, then you will have to whitelist the outbound IP address of the function app. If you would like to have a dedicated IP address that doesn't change, then you have to make use of NAT gateway as you mentioned.

    Hope this helps! Feel free to reach out to me if you have any queries or concerns.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.