Azure功能代理,can';我不能让它正常工作

Azure功能代理,can';我不能让它正常工作,azure,azure-functions,Azure,Azure Functions,我有两个函数,一个是Set和一个是Go,该函数将href作为查询字符串并返回一个代码(URL shortner)。Go函数获取代码并返回URL。到目前为止,我有: Http Functions: Api: [GET,POST,HEAD,PUT,DELETE,OPTIONS,PATCH,TRACE] http://localhost:7071/api/{*path} RedirectUrl: [GET] http://localhost:7071/{*shortUrl} Go: [GET,POS

我有两个函数,一个是
Set
和一个是
Go
,该函数将href作为查询字符串并返回一个代码(URL shortner)。Go函数获取代码并返回URL。到目前为止,我有:

Http Functions:

Api: [GET,POST,HEAD,PUT,DELETE,OPTIONS,PATCH,TRACE] http://localhost:7071/api/{*path}
RedirectUrl: [GET] http://localhost:7071/{*shortUrl}
Go: [GET,POST] http://localhost:7071/api/Go/{shortUrl}
Set: [GET,POST] http://localhost:7071/api/Set
使用以下proxies.json:

{
  "$schema": "http://json.schemastore.org/proxies",
  "proxies": {
    "RedirectUrl": {
      "matchCondition": {
        "route": "/{*shortUrl}",
        "methods": [
          "GET"
        ]
      },
      "backendUri": "https://%WEBSITE_HOSTNAME%/api/Go/{shortUrl}"
    },
    "Api": {
      "matchCondition": {
        "route": "/api/{*path}"
      },
      "backendUri": "https://%WEBSITE_HOSTNAME%/api/{path}"
    }
  }
}
但我想解决的问题很少:

我希望能够做到:

  • http://localhost:7071/api/Go/{shortUrl}
    但这会产生一个例外:
  • Executed'Go'(失败,Id=f2786621-3486-432b-84c2-1a125b01d1d2)[11-07-2019 10:58:14]System.Private.CoreLib:执行函数:Go时出现异常。Microsoft.Azure.WebJobs.Host:异常绑定参数“shortUrl”。Microsoft.Azure.WebJobs.Host:绑定数据不包含预期值“shortUrl”。

    我不知道为什么

  • 我想写,然后重定向到我自己的网站(外部,只是一个网址)。如果我写的话,我会在代码中重定向到外部URL,但是在这里我没有找到我的代码,所以如果可能的话,我需要从proxies.json中的root重定向
  • 我怎样才能做到这一点

    顺便说一句,所有这些都只是

    /多尼布