如何配置 Azure Functions 访问限制以允许通过门户进行测试
How to configure Azure Function access restrictions to allow for testing via portal
我已将我的 Azure 函数应用程序设置为限制对 APIM public IP 和我的桌面 IP 的访问。我似乎无法在门户本身内测试功能(即转到 MyFunctionAppName > TestFunction > Code + Test > Test/Run),因为我收到一条错误消息“您必须具有直接网络访问权限才能 运行 你的功能。你的应用程序可能受到专用端点、访问限制或服务端点的限制。”我不确定是否需要添加 IP 或其他东西让我通过门户本身进行测试。
it means that Test/Run button sends test request from server side (Azure) - at least it would explain why request comes not from your IP address but from Azure (if it would send request from client side - request would come from your IP address). So your workaround with adding Azure IP to white list looks correct
这个回答可能对你有帮助,请参考这个question。
我已将我的 Azure 函数应用程序设置为限制对 APIM public IP 和我的桌面 IP 的访问。我似乎无法在门户本身内测试功能(即转到 MyFunctionAppName > TestFunction > Code + Test > Test/Run),因为我收到一条错误消息“您必须具有直接网络访问权限才能 运行 你的功能。你的应用程序可能受到专用端点、访问限制或服务端点的限制。”我不确定是否需要添加 IP 或其他东西让我通过门户本身进行测试。
it means that Test/Run button sends test request from server side (Azure) - at least it would explain why request comes not from your IP address but from Azure (if it would send request from client side - request would come from your IP address). So your workaround with adding Azure IP to white list looks correct
这个回答可能对你有帮助,请参考这个question。