简体   繁体   English

如何创建 Azure Function 应用程序 + Swagger 以供逻辑应用程序使用

[英]How to create Azure Function App + Swagger to be used by Logic Apps

I have an Azure Function App in.Net Core 3.1 that implements Swagger.我有一个 Azure Function App in.Net Core 3.1 实现了 Swagger。 The Swagger page works as intended. Swagger 页面按预期工作。 When I try to create a Logic App that uses the HTTP + Swagger step, it asks for the Swagger Enpoint Url .当我尝试创建一个使用HTTP + Swagger步骤的逻辑应用程序时,它会询问Swagger Enpoint Z022A3A357ED712FB59ADFBCC277 So far any entries generate error:到目前为止,任何条目都会产生错误:

Failed to fetch swagger with error message: Failed to fetch. Ensure you have CORS enabled on the endpoint and are calling a valid HTTPS endpoint.

I have tried the following urls:我尝试了以下网址:

I have enabled CORS in the function app, but I do not know what to use for Allowed Origins .我已经在 function 应用程序中启用了 CORS ,但我不知道该使用什么Allowed Origins Docs said to use '*', but that results in:文档说使用'*',但这会导致:

The Access-Control-Allow-Credentials response header is not compatible with wildcard origin.

To allow CORS as described check-box needs to be off.要允许 CORS 如所述复选框需要关闭。 Now HTTP+Swagger connects and appears to function.现在 HTTP+Swagger 连接并出现在 function 上。

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从 azure function 创建 azure 逻辑应用程序 - Create azure logic app from azure function 如何使用 Azure 逻辑应用创建 Blob 容器? - How to create a blob container with Azure Logic Apps? 如何为 Azure ACR 创建 Azure 逻辑应用程序? - How create azure logic app for Azure ACR? 如何为 Function APP 生成 Azure Swagger UI - How to generate Azure Swagger UI for Function APP 是否有任何模板可以同时用于 azure CI/CD 中的逻辑应用和函数应用? - Is there any template which can be used for both Logic Apps and Function Apps in azure CI/CD? 如何在Azure逻辑应用中创建条件对象? - How to create conditional objects in Azure Logic App? 如何在Azure Logic应用中的SFTP服务器上创建文件夹? - How to create a folder on a SFTP server in Azure Logic Apps? Azure 逻辑应用程序 - 如何从动态数组创建唯一数组? - Azure logic apps - how to create unique array from dynamic array? 如何在 azure 逻辑应用程序中动态创建存储连接 - How to create storage connection dynamically in azure logic apps 在azure Logic Apps中,我们是否必须为每个集成创建单独的逻辑应用程序 - In azure Logic Apps do we have to create separate logic app for each integration
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM