Azure functions Azure功能代理服务于spa和其他功能

Azure functions Azure功能代理服务于spa和其他功能,azure-functions,url-routing,reverse-proxy,azure-function-app-proxy,Azure Functions,Url Routing,Reverse Proxy,Azure Function App Proxy,我有一个azure function应用程序,其中几乎没有HTTP功能。它们都使用/api路由前缀。它工作得很好 我添加了proxies.json,其中包含一些路由,用于将请求转发到存储帐户中托管的spa 水疗路线: /root : <storage account>/ /landing : <storage account>/landing /landing/{*rest} : <storage account>/landing/{rest} /root

我有一个azure function应用程序,其中几乎没有HTTP功能。它们都使用
/api
路由前缀。它工作得很好

我添加了proxies.json,其中包含一些路由,用于将请求转发到存储帐户中托管的spa

水疗路线:

/root : <storage account>/ 
/landing : <storage account>/landing
/landing/{*rest} : <storage account>/landing/{rest}
/root:/
/着陆:/landing
/landing/{*rest}:/landing/{rest}
以上路线效果良好。但添加此代理后,函数停止工作。所以我在下面添加了函数路由

/api/{*rest} : <function app url>/api/{rest}
/api/{*rest}:/api/{rest}
现在函数调用进入无限循环,因为代理将函数调用重定向回代理

问题如下:

  • 我们是否可以从同一个代理服务器同时提供功能和SPA ?

  • 我们不需要通过代理服务函数。那么到底有没有 我们可以从代理中排除
    /api
    路由

  • 我们是否可以通过 环境变量