[英]Azure Logic Apps - Http connector omits custom response headers
We have third party rest api which returns some custom information as part of response headers and we are calling this api from azure logic app http connector.我们有第三方 rest api,它返回一些自定义信息作为响应标头的一部分,我们从 azure 逻辑应用程序 http 连接器调用此 api。
We noticed that, logic app http connector omits the custom response headers.我们注意到,逻辑应用 http 连接器省略了自定义响应标头。
From postman it works fine and it returns "Authorization" custom header as shown in below screen shot, but logic app http connector removes it.从 postman 开始,它工作正常并返回“授权”自定义 header,如下图所示,但逻辑应用程序 http 连接器将其删除。
Please suggest if there is any solution for this.请建议是否有任何解决方案。
To add the http custom connector header in azure logic app http connector.在 azure 逻辑应用 http 连接器中添加 http 自定义连接器 header。
follow the bellow steps按照下面的步骤
"actions": {
"http": {
"type": "Http",
"inputs": {
"method": "POST",
"uri": "your URI",
"headers": {
"Content-Type": "application/json",
"Authorization": "Basic *your base64 password*",
"other header": "other value"
}
},
"conditions": []
}
},
it looks like the below screenshot它看起来像下面的截图
Refer the SO for further information.有关详细信息,请参阅SO 。
Also check the Custom Connector document on how to add custom connectors to logic apps.另请查看自定义连接器文档,了解如何将自定义连接器添加到逻辑应用。
Indeed, the Authorization
header is removed from the response, no doubt because of some security considerations.实际上, Authorization
header 已从响应中删除,这无疑是出于某些安全考虑。
I don't think you can get around this issue without introducing some proxy, eg我不认为你可以在不引入一些代理的情况下解决这个问题,例如
Authorization
) header to hold the value from the Authorization
header of the third party response.逻辑应用程序向 Azure Function 发送请求,它将其重定向到您的第三方 REST API 并将其响应返回给逻辑应用程序,但使用不同的(不是Authorization
)header 来保存来自第三方 8080653 的Authorization
808 的值回复。 It's all a bit silly.这有点傻。Authorization
header), which you would then be able to read in your Logic App.如果您使用的是API Management (这非常昂贵),那么它可以很容易地在那里设置:创建一个 API(后端是您的第三方)并将其配置为使用自定义名称设置响应 header (但值取自Authorization
标头),然后你就可以在你的逻辑应用程序中读取它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.