Azure 静态 Web 应用中 Azure 函数的 CORS
CORS for Azure Function in a Azure Static Web App
Azure Functions 允许 configuring CORS policies in a Function App. But how do we do the same for a Function created in a Azure Static Web app.
静态 Web 应用程序 UI 没有配置 CORS 的功能(下面的屏幕截图)。
您不必单独设置 CORS,当您从 Azure 静态 Web 应用站点中的静态页面调用函数端点时,所有 CORS settings
默认为您设置。
如果您想从外部端点访问 Azure 静态 Web 应用程序中的 API,如前所述 here。
Azure Functions 允许 configuring CORS policies in a Function App. But how do we do the same for a Function created in a Azure Static Web app.
静态 Web 应用程序 UI 没有配置 CORS 的功能(下面的屏幕截图)。
您不必单独设置 CORS,当您从 Azure 静态 Web 应用站点中的静态页面调用函数端点时,所有 CORS settings
默认为您设置。
如果您想从外部端点访问 Azure 静态 Web 应用程序中的 API,如前所述 here。