Webhook 回调从 Azure Function 获得意外响应 301

Webhook callback getting unexpected response 301 from Azure Function

我创建了一个 Azure Functions 并将其托管在 Azure 中。它接受“post”和“get”请求,我可以在本地 运行 并在 GET 或 POST 时获取一些日志输出。

当我在 Azure 中托管它时,如果我执行 GET 或 POST,我可以获得相同的输出,这正是我所期望的(通过 postman)。

我正在使用第三方工具回调我的 Azure 函数 URL。发送此回调后,我没有在 Azure CLI 中获得任何日志输出。它使用的地址与我用来在门户中获取输出的地址完全相同。

第三方工具表示正在收到 HTTP 301 响应。

当我可以 post/get 从 Postman 发送到同一地址并得到 200 返回时,为什么回调会得到 HTTP 301?

函数代码:

[FunctionName("AddressNotification")]
        public static async Task<IActionResult> Run(
            [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
            ILogger log)
        {
            log.LogInformation($"Address Callback function hit from req: {req.Host.ToString()}");

            var content = await new StreamReader(req.Body).ReadToEndAsync();
            log.LogInformation($"Request body: {content}");

            return new OkResult();
        }

第三方工具说我遇到了 301:

我假设您只在函数中启用了 https